Question: Using Samtools to convert bam to sam file
1
gravatar for gerritvanderende
4.4 years ago by
United States
gerritvanderende10 wrote:

I am trying to convert a bam file to sam file in samtools and I need to designate the directory where the sam file is saved to. How would this be accomplished in samtools?

next-gen • 10k views
ADD COMMENTlink modified 4.3 years ago • written 4.4 years ago by gerritvanderende10

what did you try so far ?....

ADD REPLYlink written 4.3 years ago by Pierre Lindenbaum124k

i just tried view and the bam file name, view and the bam file directory location. I'm new to all of this so I apologize if I am asking annoying or obvious questions.

ADD REPLYlink modified 4.3 years ago • written 4.3 years ago by gerritvanderende10
3
gravatar for skbrimer
4.3 years ago by
skbrimer610
United States
skbrimer610 wrote:

Hi, 

To include the header you can use this

samtools view -h -o yourDir/test.sam test.bam 
ADD COMMENTlink written 4.3 years ago by skbrimer610
1
gravatar for Aurélien Guy-Duché
4.3 years ago by
France
Aurélien Guy-Duché30 wrote:

Hello,

samtools view test.bam > yourDir/test.sam
ADD COMMENTlink written 4.3 years ago by Aurélien Guy-Duché30
2

what about the BAM header. Aurelien, now, go back writing your internship report :-)

ADD REPLYlink written 4.3 years ago by Pierre Lindenbaum124k
1

Now, this is cyberbullying !! :-)

ADD REPLYlink written 4.3 years ago by Ashutosh Pandey11k
1

Sir, yes Sir ! :-)

ADD REPLYlink written 4.3 years ago by Aurélien Guy-Duché30
0
gravatar for gerritvanderende
4.3 years ago by
United States
gerritvanderende10 wrote:

Thank you all for your help. I am learning programming languages so hopefully I won't have to ask continual questions.

ADD COMMENTlink written 4.3 years ago by gerritvanderende10
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1913 users visited in the last hour