Hi,
I'm using bowite for alignment with the following script:
${bowtie_source} --best --sam ${ref_genome} ${fastq_file} | ${samtools} view -bS - | ${samtools} sort -o ${target_dir}/${sample_name}.bam
and on the terminal I get the statistics:
# reads processed: 12641952
# reads with at least one reported alignment: 5914379 (46.78%)
# reads that failed to align: 5352269 (42.34%)
# reads with alignments suppressed due to -m: 1375304 (10.88%)
Reported 5914379 alignments
Anyone know how to get this statistics into a text file, plus maybe more statistics that can be extracted besides what is printed on the terminal?
Bella_p, I just noticed something: You're using
${samtools}
and${bowtie_source}
, notsamtools
andbowtie
. Why is that?Because OP is wrapping samtools around a bash script, and wrapping the bash script around python.
Maybe snakemake or nextflow would be useful to OP.