Question: prevent [samopen] from being printed by samtools
0
gravatar for shuelga
5.7 years ago by
shuelga20
United States
shuelga20 wrote:

I am calling samtools as a subprocess from a script, many times. Each time it runs I get a message to the screen that says "[samopen] SAM header is present: X sequences". I have tried to redirect it, but have not been successful. I don't see any kind of "quiet" mode option in samtools. Is there a way to make this not print every time I call samtools?

samtools subprocess alignment • 1.6k views
ADD COMMENTlink modified 5.7 years ago by Devon Ryan97k • written 5.7 years ago by shuelga20
2
gravatar for Pierre Lindenbaum
5.7 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum131k wrote:

redirect stderr to /dev/null  http://askubuntu.com/questions/350208/what-does-2-dev-null-mean

 

cmd 2> /dev/null
ADD COMMENTlink written 5.7 years ago by Pierre Lindenbaum131k

Thanks for a quick response. I tried that and it didn't seem to work, although my call piped output to another call, so I just had to relocate the stderr redirect to the first call and now it works (duh). Thank you!

ADD REPLYlink written 5.7 years ago by shuelga20
1
gravatar for Devon Ryan
5.7 years ago by
Devon Ryan97k
Freiburg, Germany
Devon Ryan97k wrote:

Aside from redirecting stderr to /dev/null, as Pierre mentioned, you could also just using a more recent version of samtools. I think version 0.1.19 was the last one to do this (github seems to confirm this).
 

ADD COMMENTlink written 5.7 years ago by Devon Ryan97k

oh! thanks for the tip. i will also update.

ADD REPLYlink written 5.7 years ago by shuelga20
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: 1587 users visited in the last hour