Entering edit mode
3.6 years ago
daewowo
▴
80
I am using the following command to align with bowtie2
cmd = f"bowtie2 -x {BOWTIE_REF} -1 {fastq_1} -2 {fastq_2} -S {out_file} --threads {NUM_THREADS} --local --score-min G,298,0 --un {un_path}"
The file at un_path is created but nothing is written to it. I have tested this on multiple alignments. Every time, un_path file is created but is always empty. Any ideas
I tried without the --score-min parameter and without both --local and --score-min, but still no reads are written to the unaligned file. The dataset is metagenomic and only a fraction of these correspond to the reference genome I am aligning to. Bowtie2 version 2.4.2
The --un parameter writes unpaired reads, but you're giving it paired reads. If instead of -1 R1.fq -2 R2.fq, you try -U R1.fq,R2.fq (mimicking unpaired reads) I bet you'll get reads in your un file (you can try this on a small sample of reads). In fact, just try a single end alignment example, and see if your command works. I would try it on the command line (not as a python command), and once you get a result, see if you can reproduce it as a python command.
Thanks, worked