Yes, this fixed the issue. Thanks so much for your time and fast responses!
Hi, I've been running bowtie1 where I've been querying a list of 20-mers in a single fasta file against the drosophila genome as my index. I've successfully been able to generate a sam file, however after converting my sam file to .bed the bed file does not contain the associated query sequence with each hit.
I used samtools to convert the .sam file to bam and bedtools to convert bam to bed. When running samtools view, each line was outputting continuously :
W::sam_parse1] empty query name
[W::sam_parse1] empty query name
[W::sam_parse1] empty query name
[W::sam_parse1] empty query name
[W::sam_parse1] empty query name
[W::sam_parse1] empty query name
[W::sam_parse1] empty query name
Does this mean bowtie 1 is failing to output the query in the sam file, since I don't see it when I search the sam file. If so, how would I be able to include my query in the output of bowtie1
Here's the code I used in each program:
bowtie test kmer_CR43193.fasta luck.sam -v 2 --threads 6 -f --sam
sudo samtools view -S -b luck.sam > luck.bam
bedtools bamtobed -i luck.bam > luck.bed
1 answer
I think you have a space in your fasta headers between > and actual name. So the read name in your case is set to space and what you are seeing above is column 2 in SAM file.
Removing those spaces and with some dummy phiX data I see no problems. So remove those spaces between > and CR.
$ more test1.fa
>CR_43193_1
CTCTACTGTAGACATTTTTACTTTTTATGTCCCTCATCGTCACGT
>CR_43193_2
GCGGTAGGTTTTCTGCTTAGGAGTTTAATCATGTTTCAGACTTTTAT
>CR_43193_3
GCCTTATGGTTACAGTATGCCCATCGCAGTTCGCTACACGCAGGAC
$ bowtie phiX_genome -f test1.fa --sam test.sam
$ cat test.sam | grep -v -e "^@SQ" -e "^@PG" -e "^@HD"
CR_43193_1 0 phix 1186 255 45M * 0 0 CTCTACTGTAGACATTTTTACTTTTTATGTCCCTCATCGTCACGT IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
IIIIIIIIIII XA:i:0 MD:Z:45 NM:i:0 XM:i:1
CR_43193_2 0 phix 2365 255 47M * 0 0 GCGGTAGGTTTTCTGCTTAGGAGTTTAATCATGTTTCAGACTTTTAT IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
IIIIIIIIIIIII XA:i:0 MD:Z:47 NM:i:0 XM:i:1
CR_43193_3 0 phix 4877 255 46M * 0 0 GCCTTATGGTTACAGTATGCCCATCGCAGTTCGCTACACGCAGGAC IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
IIIIIIIIIIII XA:i:0 MD:Z:46 NM:i:0 XM:i:1
Log in to answer this question.
Can you show us the output of
the FBgn genes are part of my genome index, but not sure what's on the left most column.
Indeed there are no read names. I think what happened is that you needed to let
bowtieknow that your input was in fasta format but you did not do that correctly. Try this (-fneeds to be before the fasta file name) :Then show us the command output from my command again. It should be correct this time.
Let us make sure that your fasta file does have headers. Show us the output of
Its still outputting the same .sam file.
my fasta has labels for all the kmers,