UcarLab / AMULET

A count based method for detecting doublets from single nucleus ATAC-seq (snATAC-seq) data.
https://ucarlab.github.io/AMULET/
GNU General Public License v3.0
29 stars 5 forks source link

Doesn't run #4

Closed cnk113 closed 3 years ago

cnk113 commented 3 years ago

Hello,

I downloaded directly from the binary releases and it seems throw this error.

Reading BAM file.                                                                                                                                                                                       [434/804]java.io.FileNotFoundException: ../ATACDoublet_output/Overlaps.txt (No such file or directory)                                                                                                                            at java.io.FileOutputStream.open0(Native Method)                                                                                                                                                                 at java.io.FileOutputStream.open(FileOutputStream.java:270)                                                                                                                                                      at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:101)
        at java.io.FileWriter.<init>(FileWriter.java:63)
        at org.jax.snatacoverlapcounter.OverlapCounter.findOverlaps(OverlapCounter.java:179)                                                                                                                             at org.jax.snatacoverlapcounter.OverlapCounter.main(OverlapCounter.java:99)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:61)
java.io.FileNotFoundException: ../ATACDoublet_output/Error_2021-02-12T203531.txt (No such file or directory)
        at java.io.FileOutputStream.open0(Native Method)
        at java.io.FileOutputStream.open(FileOutputStream.java:270)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:101)
        at java.io.FileWriter.<init>(FileWriter.java:63)
        at org.jax.snatacoverlapcounter.util.Util.writeCompletionFile(Util.java:96)
        at org.jax.snatacoverlapcounter.util.Util.writeErrorFile(Util.java:107)
        at org.jax.snatacoverlapcounter.OverlapCounter.main(OverlapCounter.java:104)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:61)
java.io.FileNotFoundException: ../ATACDoublet_output/Overlaps.txt (No such file or directory)
        at java.io.FileOutputStream.open0(Native Method)
        at java.io.FileOutputStream.open(FileOutputStream.java:270)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:101)                                                                                                                                                    at java.io.FileWriter.<init>(FileWriter.java:63)
        at org.jax.snatacoverlapcounter.OverlapCounter.findOverlaps(OverlapCounter.java:179)
        at org.jax.snatacoverlapcounter.OverlapCounter.main(OverlapCounter.java:99)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:61)
java.io.FileNotFoundException: ../ATACDoublet_output/RunTime.txt (No such file or directory)
        at java.io.FileOutputStream.open0(Native Method)
        at java.io.FileOutputStream.open(FileOutputStream.java:270)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:101)
        at java.io.FileWriter.<init>(FileWriter.java:63)
        at org.jax.snatacoverlapcounter.OverlapCounter.writeRunTime(OverlapCounter.java:131)
        at org.jax.snatacoverlapcounter.OverlapCounter.main(OverlapCounter.java:112)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:61)

I have Java 8, and all my inputs are directly from CellRanger outputs. Any ideas?

alperoglu commented 3 years ago

Hi @cnk113, can you share the bash shell script that you used to run the program? Also did you create the ATACDoublet_output output directory beforehand?

Best, Alper

cnk113 commented 3 years ago

So I was using the bash script supplied in the repo, but when I run overlaps and then doublets manually it works.

cnk113 commented 3 years ago

Now there's a different issue. I have 20000 cell loaded run, but I only end up detect 1300 doublets ~6%. All the inputs are straight from the cellranger ouput (bam, singlecell.csv) This figure is too low for the loading, any ideas on what's going wrong?

ajt986 commented 3 years ago

The shell script is unaware of where it is located on the file path and requires full paths to execute properly. I haven't found a good solution for this unfortunately. I'll see what I can do to in the next release so that relative paths are handled appropriately.

Low number of doublets detected could be a result of having few valid read pairs per nucleus/cell. We estimate between 20k-25k valid read pairs per nucleus/cell will achieve high recall for detecting doublets. Taking the average of the second column of OverlapSummary.txt will give you the average valid read pairs. You could try increasing the FDR threshold as well by either manually selecting cell_ids/barcodes in the DoubletProbabilities.txt output or using the --q option of the python script and rerunning. The current default is 0.01 q-value (FDR adjusted p-value).

cnk113 commented 3 years ago

Ah so I'm going to run different FDR values, but my cells were sequenced deeply almost 100,000 reads (haven't checked read pairs) per cell. Would the increased sequencing depth affect underlying algorithms assumptions?

ajt986 commented 3 years ago

In our analyses, increased read depth per nucleus should help to improve the sensitivity/recall of the method. Basically, the more reads for a single nucleus, the greater the chance of detecting that more than 2 chromosomes are associated with one barcode.