@@ -118,8 +118,10 @@ def convert_raw_to_fastq(self):
118118 if 'TellReadJob' not in self .skip_steps :
119119 job .run (callback = self .job_callback )
120120
121- self .pipeline .get_sample_ids ()
122- failed_samples = []
121+ # audit the results to determine which samples failed to convert
122+ # properly. Append these to the failed-samples report and also
123+ # return the list directly to the caller.
124+ failed_samples = job .audit ()
123125 if hasattr (self , 'fsr' ):
124126 # NB 16S does not require a failed samples report and
125127 # it is not performed by SPP.
@@ -130,32 +132,35 @@ def convert_raw_to_fastq(self):
130132 def generate_sequence_counts (self ):
131133 config = self .pipeline .get_software_configuration ('tell-seq' )
132134
135+ files_to_count_path = join (self .pipeline .output_path ,
136+ 'files_to_count.txt' )
137+
138+ with open (files_to_count_path , 'w' ) as f :
139+ for root , _ , files in walk (self .raw_fastq_files_path ):
140+ for _file in files :
141+ if self ._determine_orientation (_file ) in ['R1' , 'R2' ]:
142+ print (join (root , _file ), file = f )
143+
133144 job = SeqCountsJob (self .pipeline .run_dir ,
134145 self .pipeline .output_path ,
135- self .pipeline .input_file_path ,
136146 config ['queue' ],
137147 config ['nodes' ],
138148 config ['wallclock_time_in_minutes' ],
139149 config ['normcount_mem_limit' ],
140150 config ['modules_to_load' ],
141151 self .master_qiita_job_id ,
142- '' ,
143- config ['integrate_script_path' ],
144- self .pipeline .qiita_job_id )
152+ config ['job_max_array_length' ],
153+ files_to_count_path ,
154+ self .pipeline .get_sample_sheet_path (),
155+ cores_per_task = config ['tellread_cores' ])
145156
146157 if 'SeqCountsJob' not in self .skip_steps :
147158 job .run (callback = self .job_callback )
148159
149- # audit the results to determine which samples failed to convert
150- # properly. Append these to the failed-samples report and also
151- # return the list directly to the caller.
152- failed_samples = job .audit_me (self .pipeline .get_sample_ids ())
153- if hasattr (self , 'fsr' ):
154- # NB 16S does not require a failed samples report and
155- # it is not performed by SPP.
156- self .fsr .write (failed_samples , job .__class__ .__name__ )
157-
158- return failed_samples
160+ # Do not add an entry to fsr because w/respect to counting, either
161+ # all jobs are going to fail or none are going to fail. It's not
162+ # likely that we're going to fail to count sequences for only some
163+ # of the samples.
159164
160165 def integrate_results (self ):
161166 config = self .pipeline .get_software_configuration ('tell-seq' )
@@ -173,7 +178,6 @@ def integrate_results(self):
173178 config ['integrate_mem_limit' ],
174179 config ['modules_to_load' ],
175180 self .master_qiita_job_id ,
176- "foo" ,
177181 config ['integrate_script_path' ],
178182 # NB: sample_index_list used may vary
179183 # from project to project in the future.
@@ -224,7 +228,7 @@ def integrate_results(self):
224228 # audit the results to determine which samples failed to convert
225229 # properly. Append these to the failed-samples report and also
226230 # return the list directly to the caller.
227- failed_samples = job .audit_me ( self . pipeline . get_sample_ids () )
231+ failed_samples = job .audit ( )
228232
229233 if hasattr (self , 'fsr' ):
230234 # NB 16S does not require a failed samples report and
0 commit comments