@@ -140,7 +140,7 @@ def create(cls, md_template, raw_data, study, data_type,
140
140
"prep_template_id" , (data_type_id , raw_data .id ,
141
141
investigation_type ))[0 ]
142
142
143
- cls ._add_commoneation_steps_to_queue (md_template , prep_id ,
143
+ cls ._add_common_creation_steps_to_queue (md_template , prep_id ,
144
144
conn_handler , queue_name )
145
145
146
146
try :
@@ -418,10 +418,16 @@ def create_qiime_mapping_file(self):
418
418
rename_cols = {
419
419
'barcode' : 'BarcodeSequence' ,
420
420
'primer' : 'LinkerPrimerSequence' ,
421
- 'reverselinkerprimer' : 'ReverseLinkerPrimer' ,
422
421
'description' : 'Description' ,
423
422
}
424
423
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
+
425
431
# getting the latest sample template
426
432
conn_handler = SQLConnectionHandler ()
427
433
sql = """SELECT filepath_id, filepath
@@ -475,7 +481,6 @@ def create_qiime_mapping_file(self):
475
481
cols .remove ('BarcodeSequence' )
476
482
cols .remove ('LinkerPrimerSequence' )
477
483
cols .remove ('Description' )
478
- new_cols = ['BarcodeSequence' , 'LinkerPrimerSequence' ]
479
484
new_cols .extend (cols )
480
485
new_cols .append ('Description' )
481
486
mapping = mapping [new_cols ]
0 commit comments