Question: samtools and I/O redirection
0
gravatar for wangdp123
2.3 years ago by
wangdp123250
Oxford
wangdp123250 wrote:

Hello,

I am using 2> and 1> to output the stderr and stdout to two files but when I use samtools to convert test.bam into test.sam, it seems that there is no output in the result file (test.sam).

samtools view -h test.bam > test.sam 2> bam2sam.stderr 1> bam2sam.stdout

Would you like to help me out?

Many thanks,

Tom

samtools • 659 views
ADD COMMENTlink written 2.3 years ago by wangdp123250
2

let's take a step back, why do you want a sam file to begin with?

ADD REPLYlink written 2.3 years ago by Gabriel R.2.8k
2
gravatar for WouterDeCoster
2.3 years ago by
Belgium
WouterDeCoster44k wrote:

you use samtools to write to stdout to test.sam, but then you redirect stdout to another file. Not surprisingly, test.sam remains empty...

ADD COMMENTlink written 2.3 years ago by WouterDeCoster44k
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: 927 users visited in the last hour