Skip to content

Commit 6c83ba4

Browse files
committed
Fixing WTF failures
1 parent 0c9a47a commit 6c83ba4

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

qiita_db/metadata_template/prep_template.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def create(cls, md_template, raw_data, study, data_type,
140140
"prep_template_id", (data_type_id, raw_data.id,
141141
investigation_type))[0]
142142

143-
cls._add_commoneation_steps_to_queue(md_template, prep_id,
143+
cls._add_common_creation_steps_to_queue(md_template, prep_id,
144144
conn_handler, queue_name)
145145

146146
try:
@@ -418,10 +418,16 @@ def create_qiime_mapping_file(self):
418418
rename_cols = {
419419
'barcode': 'BarcodeSequence',
420420
'primer': 'LinkerPrimerSequence',
421-
'reverselinkerprimer': 'ReverseLinkerPrimer',
422421
'description': 'Description',
423422
}
424423

424+
if 'reverselinkerprimer' in self.categories():
425+
rename_cols['reverselinkerprimer'] = 'ReverseLinkerPrimer'
426+
new_cols = ['BarcodeSequence', 'LinkerPrimerSequence',
427+
'ReverseLinkerPrimer']
428+
else:
429+
new_cols = ['BarcodeSequence', 'LinkerPrimerSequence']
430+
425431
# getting the latest sample template
426432
conn_handler = SQLConnectionHandler()
427433
sql = """SELECT filepath_id, filepath
@@ -475,7 +481,6 @@ def create_qiime_mapping_file(self):
475481
cols.remove('BarcodeSequence')
476482
cols.remove('LinkerPrimerSequence')
477483
cols.remove('Description')
478-
new_cols = ['BarcodeSequence', 'LinkerPrimerSequence']
479484
new_cols.extend(cols)
480485
new_cols.append('Description')
481486
mapping = mapping[new_cols]

0 commit comments

Comments
 (0)