diff --git a/workflow/snakefile b/workflow/snakefile index 1ab1b08..a6e7360 100644 --- a/workflow/snakefile +++ b/workflow/snakefile @@ -112,10 +112,10 @@ rule sam_to_bam_format: sed 's/^[[:space:]]*//' > tmp_files/06_sam_to_bam_format/{wildcards.barcode}_abundance.tsv if [ ! -s tmp_files/06_sam_to_bam_format/{wildcards.barcode}_abundance.tsv ]; then echo '1 XXX' >> tmp_files/06_sam_to_bam_format/{wildcards.barcode}_abundance.tsv - grep -o '[^ ]\+$' tmp_files/06_sam_to_bam_format/{wildcards.barcode}_abundance.tsv > {output.ASV_list} + grep -Eo "[^ ]+$" tmp_files/06_sam_to_bam_format/{wildcards.barcode}_abundance.tsv > {output.ASV_list} echo 'XXX XXX;XXX;XXX;XXX;XXX;SANITY'> {output.taxonomy_file} else - grep -o '[^ ]\+$' tmp_files/06_sam_to_bam_format/{wildcards.barcode}_abundance.tsv > {output.ASV_list} + grep -Eo "[^ ]+$" tmp_files/06_sam_to_bam_format/{wildcards.barcode}_abundance.tsv > {output.ASV_list} grep -f {output.ASV_list} tmp_files/00_database_indexing/TAXONOMY_{DATABASE_NAME} > {output.taxonomy_file} fi """ @@ -227,4 +227,4 @@ rule phyloseq: """ Rscript {NANOASV_PATH}/workflow/scripts/script.r {INPUT_DIR} {OUT} {R_CLEANING} {TREE} {METADATA} 2> /dev/null touch {output} - """ \ No newline at end of file + """