@@ -76,8 +76,8 @@ def test_get_qiime_minimal_mapping_multiple(self):
76
76
'ebi_submission_accession' : None ,
77
77
'EMP_status' : 'EMP' ,
78
78
'str_column' : 'Value for sample 1' ,
79
- 'linkerprimersequence ' : 'GTGCCAGCMGCCGCGGTAA' ,
80
- 'barcodesequence ' : 'GTCCGCAAGTTA' ,
79
+ 'primer ' : 'GTGCCAGCMGCCGCGGTAA' ,
80
+ 'barcode ' : 'GTCCGCAAGTTA' ,
81
81
'run_prefix' : "s_G1_L001_sequences" ,
82
82
'platform' : 'ILLUMINA' ,
83
83
'library_construction_protocol' : 'AAA' ,
@@ -87,8 +87,8 @@ def test_get_qiime_minimal_mapping_multiple(self):
87
87
'ebi_submission_accession' : None ,
88
88
'EMP_status' : 'EMP' ,
89
89
'str_column' : 'Value for sample 2' ,
90
- 'linkerprimersequence ' : 'GTGCCAGCMGCCGCGGTAA' ,
91
- 'barcodesequence ' : 'CGTAGAGCTCTC' ,
90
+ 'primer ' : 'GTGCCAGCMGCCGCGGTAA' ,
91
+ 'barcode ' : 'CGTAGAGCTCTC' ,
92
92
'run_prefix' : "s_G1_L001_sequences" ,
93
93
'platform' : 'ILLUMINA' ,
94
94
'library_construction_protocol' : 'AAA' ,
@@ -98,8 +98,8 @@ def test_get_qiime_minimal_mapping_multiple(self):
98
98
'ebi_submission_accession' : None ,
99
99
'EMP_status' : 'EMP' ,
100
100
'str_column' : 'Value for sample 3' ,
101
- 'linkerprimersequence ' : 'GTGCCAGCMGCCGCGGTAA' ,
102
- 'barcodesequence ' : 'CCTCTGAGAGCT' ,
101
+ 'primer ' : 'GTGCCAGCMGCCGCGGTAA' ,
102
+ 'barcode ' : 'CCTCTGAGAGCT' ,
103
103
'run_prefix' : "s_G1_L002_sequences" ,
104
104
'platform' : 'ILLUMINA' ,
105
105
'library_construction_protocol' : 'AAA' ,
@@ -217,6 +217,7 @@ def test_get_preprocess_fasta_cmd_sff_run_prefix(self):
217
217
raw_data = RawData (3 )
218
218
params = Preprocessed454Params (1 )
219
219
prep_template = PrepTemplate (1 )
220
+ prep_template .generate_files ()
220
221
221
222
obs_cmd , obs_output_dir = _get_preprocess_fasta_cmd (
222
223
raw_data , prep_template , params )
@@ -245,21 +246,21 @@ def test_get_preprocess_fasta_cmd_sff_run_prefix_match(self):
245
246
new_fp_id = get_count ('qiita.filepath' ) + 1
246
247
conn_handler = SQLConnectionHandler ()
247
248
sql = ("""
248
- INSERT INTO qiita.filepath (filepath_id, filepath,
249
- filepath_type_id, checksum, checksum_algorithm_id,
250
- data_directory_id) VALUES (%s, '1_new.sff', 17, 852952723, 1,
251
- 5);
252
- INSERT INTO qiita.raw_filepath (raw_data_id , filepath_id) VALUES
253
- (3, %s);
249
+ INSERT INTO qiita.filepath (filepath, filepath_type_id, checksum,
250
+ checksum_algorithm_id, data_directory_id)
251
+ VALUES ('1_new.sff', 17, 852952723, 1, 5);
252
+ INSERT INTO qiita.raw_filepath (raw_data_id , filepath_id)
253
+ VALUES (3, %s);
254
254
UPDATE qiita.prep_1 SET run_prefix='preprocess_test';
255
- UPDATE qiita.prep_1 SET run_prefix='new' WHERE
256
- sample_id = '1.SKB8.640193';
255
+ UPDATE qiita.prep_1 SET run_prefix='new'
256
+ WHERE sample_id = '1.SKB8.640193';
257
257
""" )
258
- conn_handler .execute (sql , (new_fp_id , new_fp_id ))
258
+ conn_handler .execute (sql , (new_fp_id ,))
259
259
260
260
raw_data = RawData (3 )
261
261
params = Preprocessed454Params (1 )
262
262
prep_template = PrepTemplate (1 )
263
+ prep_template .generate_files ()
263
264
264
265
obs_cmd , obs_output_dir = _get_preprocess_fasta_cmd (
265
266
raw_data , prep_template , params )
@@ -291,28 +292,27 @@ def test_get_preprocess_fasta_cmd_sff_run_prefix_match_error_1(self):
291
292
fp_count = get_count ('qiita.filepath' )
292
293
conn_handler = SQLConnectionHandler ()
293
294
sql = ("""
294
- INSERT INTO qiita.filepath (filepath_id, filepath,
295
- filepath_type_id, checksum, checksum_algorithm_id,
296
- data_directory_id) VALUES (%s, '1_new.sff', 17, 852952723, 1,
297
- 5);
298
- INSERT INTO qiita.raw_filepath (raw_data_id , filepath_id) VALUES
299
- (3, %s);
300
- INSERT INTO qiita.filepath (filepath_id, filepath,
301
- filepath_type_id, checksum, checksum_algorithm_id,
302
- data_directory_id) VALUES (%s, '1_error.sff', 17, 852952723,
303
- 1, 5);
304
- INSERT INTO qiita.raw_filepath (raw_data_id , filepath_id) VALUES
305
- (3, %s);
295
+ INSERT INTO qiita.filepath (filepath, filepath_type_id, checksum,
296
+ checksum_algorithm_id, data_directory_id)
297
+ VALUES ('1_new.sff', 17, 852952723, 1, 5);
298
+ INSERT INTO qiita.raw_filepath (raw_data_id , filepath_id)
299
+ VALUES (3, %s);
300
+ INSERT INTO qiita.filepath (filepath, filepath_type_id, checksum,
301
+ checksum_algorithm_id, data_directory_id)
302
+ VALUES ('1_error.sff', 17, 852952723, 1, 5);
303
+ INSERT INTO qiita.raw_filepath (raw_data_id , filepath_id)
304
+ VALUES (3, %s);
306
305
UPDATE qiita.prep_1 SET run_prefix='preprocess_test';
307
306
UPDATE qiita.prep_1 SET run_prefix='new' WHERE
308
307
sample_id = '1.SKB8.640193';
309
308
""" )
310
309
conn_handler .execute (
311
- sql , (fp_count + 1 , fp_count + 1 , fp_count + 2 , fp_count + 2 ))
310
+ sql , (fp_count + 1 , fp_count + 2 ))
312
311
313
312
raw_data = RawData (3 )
314
313
params = Preprocessed454Params (1 )
315
314
prep_template = PrepTemplate (1 )
315
+ prep_template .generate_files ()
316
316
317
317
with self .assertRaises (ValueError ):
318
318
_get_preprocess_fasta_cmd (raw_data , prep_template , params )
@@ -332,6 +332,7 @@ def test_get_preprocess_fasta_cmd_sff_run_prefix_match_error_2(self):
332
332
raw_data = RawData (3 )
333
333
params = Preprocessed454Params (1 )
334
334
prep_template = PrepTemplate (1 )
335
+ prep_template .generate_files ()
335
336
336
337
with self .assertRaises (ValueError ):
337
338
_get_preprocess_fasta_cmd (raw_data , prep_template , params )
0 commit comments