Hi,
I am trying to align my .fq reads (end-pair reads) to my reference genome (a "close" related species) with this command:
bowtie2 --threads 4 --local --no-unal \
-x /home/luz_garcia_longoria/workspace/reference_genomes/parasitereference.fasta \
-q -k 1 --al aligned_reads.fastq \
-1 `/home/luz_garcia_longoria/workspace/s21_1.fq,s22_1.fq,s23_1.fq,s24_1.fq,s25_1.fq,s31_1.fq,s32_1.fq,s33_1.fq,s34_1.fq,s35_1.fq \
-2 /home/luz_garcia_longoria/workspace/s21_2.fq,s22_2.fq,s23_2.fq,s24_2.fq,s25_2.fq,s31_2.fq,s32_2.fq,s33_2.fq,s34_2.fq,s35_2.fq \
> aligned_host_parasite.sam |\
samtools view -b -o aligned_host_parasite.bam`
BUT if I do ll :
-rw-rw-r--. 1 luz_garcia_longoria luz_garcia_longoria 62 Sep 24 17:42 aligned_host_parasite.bam
-rw-rw-r--. 1 luz_garcia_longoria luz_garcia_longoria 30494171957 Sep 25 00:07 aligned_host_parasite.sam
-rw-rw-r--. 1 luz_garcia_longoria luz_garcia_longoria 0 Sep 24 17:42 aligned_reads.fastq
As you can see the .fastq file is completly empty and it's the one that I want to use for for doing my next step.
What am I missing?
Your fastq is empty, so it seems you somehow corrupted your data after the alignment was performed, since that file seems pretty big. Can you regenerate the fastq file?
You can also convert the bam back to fastq using
samtools fastq myaln.bam > myreads.fastq
Ok. I though also to do this but I wonder if I am going to alter somehow the BAM files and then the fastq file will be the "real" one...
Is your command pasted here properly? The
`
begins after the-1
but does not end at the right place.You have to re-write the path for all your fq or launch your script from your workspace
Same for option
-2
What if OP used shell expansion?
Ofc it is an elegant solution but brackets are missing from OP command line
the command is
And I am running this command in workspace :)
If you're running your command from
/home/luz_garcia_longoria/workspace/
you don't need it in option-1
and-2