-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixes issue encountered during testing. #96
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -118,8 +118,10 @@ def convert_raw_to_fastq(self): | |
if 'TellReadJob' not in self.skip_steps: | ||
job.run(callback=self.job_callback) | ||
|
||
self.pipeline.get_sample_ids() | ||
failed_samples = [] | ||
# audit the results to determine which samples failed to convert | ||
# properly. Append these to the failed-samples report and also | ||
# return the list directly to the caller. | ||
failed_samples = job.audit() | ||
if hasattr(self, 'fsr'): | ||
# NB 16S does not require a failed samples report and | ||
# it is not performed by SPP. | ||
|
@@ -129,33 +131,39 @@ def convert_raw_to_fastq(self): | |
|
||
def generate_sequence_counts(self): | ||
config = self.pipeline.get_software_configuration('tell-seq') | ||
# filter on corrected.err_barcode_removed | ||
|
||
files_to_count_path = join(self.pipeline.output_path, | ||
'files_to_count.txt') | ||
|
||
with open(files_to_count_path, 'w') as f: | ||
# for raw_counts_r1r2, count corrected.err_barcode_removed files | ||
# (TellReadJob final output). | ||
for root, dirs, files in walk(self.raw_fastq_files_path): | ||
for _file in files: | ||
if 'corrected.err_barcode_removed' in _file: | ||
print(join(root, _file), file=f) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't really understand this step, it's just used for printing and not nothing gets written in the file, is that what you want to do? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, this is equivalent to writing f.write("%s\n" % join(root, _file)). There is an additional parameter "file=f" that redirects the print statement from stdout to the file handle 'f'. I've been using this form lately instead of constructing a string just for the sake of appending a newline. |
||
|
||
job = SeqCountsJob(self.pipeline.run_dir, | ||
self.pipeline.output_path, | ||
self.pipeline.input_file_path, | ||
config['queue'], | ||
config['nodes'], | ||
config['wallclock_time_in_minutes'], | ||
config['normcount_mem_limit'], | ||
config['modules_to_load'], | ||
self.master_qiita_job_id, | ||
'', | ||
config['integrate_script_path'], | ||
self.pipeline.qiita_job_id) | ||
config['job_max_array_length'], | ||
files_to_count_path, | ||
self.pipeline.get_sample_sheet_path(), | ||
cores_per_task=config['tellread_cores']) | ||
|
||
if 'SeqCountsJob' not in self.skip_steps: | ||
job.run(callback=self.job_callback) | ||
|
||
# audit the results to determine which samples failed to convert | ||
# properly. Append these to the failed-samples report and also | ||
# return the list directly to the caller. | ||
failed_samples = job.audit_me(self.pipeline.get_sample_ids()) | ||
if hasattr(self, 'fsr'): | ||
# NB 16S does not require a failed samples report and | ||
# it is not performed by SPP. | ||
self.fsr.write(failed_samples, job.__class__.__name__) | ||
|
||
return failed_samples | ||
# Do not add an entry to fsr because w/respect to counting, either | ||
# all jobs are going to fail or none are going to fail. It's not | ||
# likely that we're going to fail to count sequences for only some | ||
# of the samples. | ||
|
||
def integrate_results(self): | ||
config = self.pipeline.get_software_configuration('tell-seq') | ||
|
@@ -173,7 +181,6 @@ def integrate_results(self): | |
config['integrate_mem_limit'], | ||
config['modules_to_load'], | ||
self.master_qiita_job_id, | ||
"foo", | ||
config['integrate_script_path'], | ||
# NB: sample_index_list used may vary | ||
# from project to project in the future. | ||
|
@@ -224,7 +231,7 @@ def integrate_results(self): | |
# audit the results to determine which samples failed to convert | ||
# properly. Append these to the failed-samples report and also | ||
# return the list directly to the caller. | ||
failed_samples = job.audit_me(self.pipeline.get_sample_ids()) | ||
failed_samples = job.audit() | ||
|
||
if hasattr(self, 'fsr'): | ||
# NB 16S does not require a failed samples report and | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these files being examined?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup, I have this marked in my notes. there is a patch for this that expects the integrated results directory instead of Full.