We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting OSError: [Errno 9] Bad file descriptor when trying to use pysam as a samtools wrapper. Full reproduction:
OSError: [Errno 9] Bad file descriptor
pysam
samtools
docker run -it --rm \ -u root \ -v $(pwd):/work \ -w /work \ mambaorg/micromamba@sha256:1d05a8a7d88142f8225927756272748bc5feb438c0185de362e98ae5d88bf2f4 \ bash micromamba install pysam==0.21.0 -c bioconda -c conda-forge -c defaults
cat test.sam HWI-EAS240_0001:2:1:1144:15181#0 4 * 0 0 * * 0 0 CTCAGGTGGCTTCCAACATTGGGATGAGTAACGTTAGNCATGTGTCAAGATCGGAAGANNGGTTCAGCAGGAATGC bbbabbbbbbbbabbbabbabbbabbbbb`bbbb`VWBVUWWVZXZbYbXb_bbbOOGBBOOOOO\\VX`bbbbbb
>>> import pysam >>> pysam.fastq("-0", "test.fastq", "test.sam") Traceback (most recent call last): File "<stdin>", line 1, in <module> OSError: [Errno 9] Bad file descriptor >>> Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'> OSError: [Errno 9] Bad file descriptor
However, samtools works:
micromamba install -y samtools==1.17 -c conda-forge -c bioconda -c defaults samtools fastq -0 samtools.fastq test.sam [M::bam2fq_mainloop] discarded 0 singletons [M::bam2fq_mainloop] processed 1 reads (base) root@f11037699062:/work# cat samtools.fastq @HWI-EAS240_0001:2:1:1144:15181#0 CTCAGGTGGCTTCCAACATTGGGATGAGTAACGTTAGNCATGTGTCAAGATCGGAAGANNGGTTCAGCAGGAATGC + bbbabbbbbbbbabbbabbabbbabbbbb`bbbb`VWBVUWWVZXZbYbXb_bbbOOGBBOOOOO\\VX`bbbbbb
Thanks for your help!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Getting
OSError: [Errno 9] Bad file descriptor
when trying to usepysam
as asamtools
wrapper. Full reproduction:docker run -it --rm \ -u root \ -v $(pwd):/work \ -w /work \ mambaorg/micromamba@sha256:1d05a8a7d88142f8225927756272748bc5feb438c0185de362e98ae5d88bf2f4 \ bash micromamba install pysam==0.21.0 -c bioconda -c conda-forge -c defaults
However,
samtools
works:Thanks for your help!
The text was updated successfully, but these errors were encountered: