Skip to content
New issue

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

Pysam stats failure #4

Open
BenjaminSSimpson opened this issue Jul 6, 2021 · 1 comment
Open

Pysam stats failure #4

BenjaminSSimpson opened this issue Jul 6, 2021 · 1 comment

Comments

@BenjaminSSimpson
Copy link

I have been trying to get the program up and running over the last couple of days. I am using a HPC that uses SLURM and a linux-style interface. I have used the instructions on the Install-and-Run.md sheet, following all the options for users without root privileges.

When running example file 1, I simply receive the error message: "Pysamstats failure". I checked the logs but for sample1.failed it just repeats this message. I opened python to check that it could successfully import Pysamstats, and it can. The python path is added to the run.sh file as suggested. I tried re-installing pysamstats but this did not do anything.

It is a tad difficult to troubleshoot this error, do you have any suggestions?

Best wishes,

Ben

@jsicherman
Copy link

Reviving this because I have the same issue. Relevant part of the errorlog from example2, s2.log...

htsjdk.samtools.util.RuntimeIOException: java.io.FileNotFoundException: ./align/s2.extendedFrags.bam (No such file or directory)
        at htsjdk.samtools.SAMFileReader.init(SAMFileReader.java:714)
        at htsjdk.samtools.SAMFileReader.<init>(SAMFileReader.java:189)
        at htsjdk.samtools.SAMFileReader.<init>(SAMFileReader.java:144)
        at abra.Sam2Fastq.convert(Sam2Fastq.java:49)
        at abra.ReAligner.sam2Fastq(ReAligner.java:803)
        at abra.PreprocessReadsRunnable.go(PreprocessReadsRunnable.java:32)
        at abra.AbraRunnable.run(AbraRunnable.java:20)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.io.FileNotFoundException: ./align/s2.extendedFrags.bam (No such file or directory)
        at java.base/java.io.FileInputStream.open0(Native Method)
        at java.base/java.io.FileInputStream.open(FileInputStream.java:219)
        at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
        at htsjdk.samtools.SAMFileReader.init(SAMFileReader.java:674)
Loading reference map:  ./align/amp.fa
        ... 11 more
        Chromosome: amplicon length: 738
Done loading ref map.  Elapsed secs: 0
Tue Jan 25 12:50:57 PST 2022 : Reading Input SAM Header and identifying read length
Tue Jan 25 12:50:57 PST 2022 : Identifying header and determining read length
Exception in thread "main" htsjdk.samtools.util.RuntimeIOException: java.io.FileNotFoundException: ./align/s2.notCombined.bam (No such file or directory)
        at htsjdk.samtools.SAMFileReader.init(SAMFileReader.java:714)
        at htsjdk.samtools.SAMFileReader.<init>(SAMFileReader.java:189)
        at htsjdk.samtools.SAMFileReader.<init>(SAMFileReader.java:144)
        at abra.ReAligner.getSamHeaderAndReadLength(ReAligner.java:734)
        at abra.ReAligner.reAlign(ReAligner.java:127)
        at abra.ReAligner.run(ReAligner.java:1240)
        at abra.Abra.main(Abra.java:12)
Caused by: java.io.FileNotFoundException: ./align/s2.notCombined.bam (No such file or directory)
        at java.base/java.io.FileInputStream.open0(Native Method)
        at java.base/java.io.FileInputStream.open(FileInputStream.java:219)
        at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
        at htsjdk.samtools.SAMFileReader.init(SAMFileReader.java:674)
        ... 6 more
Traceback (most recent call last):
  File "/home/jordan/bin/pysamstats", line 231, in <module>
    fields=fields,
  File "pysamstats.pyx", line 3894, in pysamstats.write_csv (pysamstats.c:38227)
  File "pysamstats.pyx", line 891, in pysamstats.stat_variation (pysamstats.c:11459)
  File "pysamstats.pyx", line 3649, in pysamstats._iter_pileup (pysamstats.c:33802)
  File "pysam/calignmentfile.pyx", line 318, in pysam.calignmentfile.AlignmentFile.__cinit__ (pysam/calignmentfile.c:4730)
  File "pysam/calignmentfile.pyx", line 403, in pysam.calignmentfile.AlignmentFile._open (pysam/calignmentfile.c:5841)
  File "pysam/calignmentfile.pyx", line 574, in pysam.calignmentfile.AlignmentFile._open (pysam/calignmentfile.c:7746)
ValueError: file header is empty (mode='r') - is it SAM/BAM format?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants