Skip to content

Commit

Permalink
Merge pull request #63 from ENCODE-DCC/ENCM-228-samtools-stats-stderr
Browse files Browse the repository at this point in the history
ENCM-228-samtools-stats-stderr
  • Loading branch information
ottojolanki authored Sep 16, 2024
2 parents af24fe9 + efaa224 commit 848e8cd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions checkfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -1178,16 +1178,16 @@ def check_file(config, session, url, job):
readLength = None
try:
runType = get_mapped_run_type_bam(job,subprocess.Popen(
['samtools', 'stats', local_path],
['samtools', 'stats', local_path],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
stderr=subprocess.DEVNULL,
universal_newlines=True))
# command from samtools documentation: http://www.htslib.org/doc/samtools-stats.html
readLength = get_mapped_read_length_bam(job,subprocess.Popen(
['samtools stats {} | grep ^RL | cut -f 2- | sort -k2 -n -r | head -1'.format(
local_path)],
local_path)],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
stderr=subprocess.DEVNULL,
shell=True,
executable='/bin/bash',
universal_newlines=True))
Expand Down

0 comments on commit 848e8cd

Please sign in to comment.