Also being dealt with here please some one help me step by step i was really exhausted
hello
again me...!
I did these steps:
In command prompt I typed bowtie2-build-s.exe example/reference/lambda_virus.fa lambda_virus
then bowtie2-align-s.exe -x lambda_virus -U example/reads/reads_1.fq -S eg1.sam
and at last after trying many times!!! I got this:
10000 reads; of these:
10000 (100.00%) were unpaired; of these:
596 (5.96%) aligned 0 times
9404 (94.04%) aligned exactly 1 time
0 (0.00%) aligned >1 times
94.04% overall alignment rate
Is the result in SAM format? If not how I can convert it to SAM format, then how I can convert obtained SAM to BAM? (windows7-64bit)
1 answer
Hi there. Glad to see you're sticking with it and having success!
It looks like your bowtie command worked. So you should have that eg1.sam file in the directory where you executed bowtie2-align-s.exe.
SAM is a text format, so you can investigate that file in a text editor.
If indeed you do see that SAM file, then you can convert it to BAM using samtools. There's a windows port of samtools available here.
The syntax for basic SAM to BAM conversion in samtools is:
samtools view -bh -o eg1.bam eg1.sam
That should give you a BAM conversion which includes the header.
Thank you very much
For sure without your valuable help, I couldn't get any success easily
Hello
After copying eg1.sam file from C:\bowtie2-2.2.4\bowtie2-2.2.4 to c:\samtools then I typed
cd c:\samtools
samtools.exe view -Sb eg1.sam > eg1.bam
it said:
[samopen] SAM header is present: 1 sequences
but when I typed samtools view -bh -o eg1.bam eg1.sam instead,
It said:
[bam_header_read] EOF marker is absent. the input is probably truncated.
[bam_header_read] invalid BAM binary header <this is not a BAM file
[main_samiew] fail to read the header from 'eg1.sam'.
Sorry may I know please, if those two commands are different that I got different results?
In second command why I received error?
Log in to answer this question.