Skip to content

Commit

Permalink
Batch type coerce and r2 file check
Browse files Browse the repository at this point in the history
  • Loading branch information
Snicker7 committed Feb 16, 2022
1 parent 442a48c commit f917366
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CRISPResso2/CRISPRessoBatchCORE.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,11 @@ def main():
#pandas either allows for auto-detect sep or for comment. not both
# batch_params=pd.read_csv(args.batch_settings,sep=None,engine='python',error_bad_lines=False)
batch_params.columns = batch_params.columns.str.strip(' -\xd0')
int_columns = ['default_min_aln_score', 'min_average_read_quality', 'min_single_bp_quality', 'min_bp_quality_or_N',
'quantification_window_size', 'quantification_window_center', 'exclude_bp_from_left', 'exclude_bp_from_right',
'plot_window_size', 'max_rows_alleles_around_cut_to_plot']
for int_col in int_columns:
batch_params[int_col]=batch_params[int_col].astype(int)

#rename column "a" to "amplicon_seq", etc
batch_params.rename(index=str, columns=CRISPRessoShared.get_crispresso_options_lookup(), inplace=True)
Expand Down Expand Up @@ -215,7 +220,7 @@ def main():
else:
CRISPRessoShared.check_file(row.fastq_r1)

if 'fastq_r2' in row and row.fastq_r2 != "":
if 'fastq_r2' in row and row.fastq_r2 != "" and row.fastq_r2 != "nan":
CRISPRessoShared.check_file(row.fastq_r2)

if 'input_bam' in row:
Expand Down

0 comments on commit f917366

Please sign in to comment.