novoalab / EpiNano

Detection of RNA modifications from Oxford Nanopore direct RNA sequencing reads (Liu*, Begik* et al., Nature Comm 2019)
GNU General Public License v2.0
109 stars 31 forks source link

error runing epinano_variants.py #126

Closed CharlotteAnne closed 1 year ago

CharlotteAnne commented 1 year ago

Hi,

When trying to run Epinano v1.2.0 variants.py with the following command:

python3 Epinano_Variants.py -R /bucket/LuscombeU/common/Breakpoints/Genomes/OSKA2016v1.9.fa \
-b /home/c/c-capitanchik/flash/osaka_direct_rna/MOP2/mop_preprocess/osdirna_results/alignment/pass_s.bam \
-s /bucket/.deigo/LuscombeU/live/charlottecapitanchik/software/jvarkit/dist/sam2tsv.jar \
-n 8 \
-T g

I get the following error:

/home/c/c-capitanchik/flash/osaka_direct_rna/MOP2/mop_preprocess/osdirna_results/alignment/pass_s_TMP_ already exists, will overwrite it
Process Process-2:
Traceback (most recent call last):
  File "/bucket/LuscombeU/live/charlottecapitanchik/software/miniconda3/envs/bioinf/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/bucket/LuscombeU/live/charlottecapitanchik/software/miniconda3/envs/bioinf/lib/python3.6/multiprocessing/process.py", line 93, in run
    self._target(*self._args, **self._kwargs)
  File "Epinano_Variants.py", line 44, in split_tsv_for_per_site_var_freq
    head = next(tsv)
StopIteration

-- please could you advise what might be wrong? Thank you for your help!

Charlotte

liuqianhn commented 1 year ago

Hi, I have a similar error. May I know how to solve it?

Meanwhile, may I know why your sam2tsv.jar is not EpiNano/misc/sam2tsv.jar @CharlotteAnne ?

enovoa commented 1 year ago

Dear @liuqianhn and @CharlotteAnne,

You should use the sam2tsv.jar version that is provided as part of EpiNano. Please use the .jar provided, rather than: /bucket/.deigo/LuscombeU/live/charlottecapitanchik/software/jvarkit/dist/sam2tsv.jar

If you still have issues, I would recommend to use the EpiNano Dockerfile that you can find here: https://github.com/novoalab/EpiNano/tree/master/dockerfile

Finally, if you are still experiencing issues, you may use EpiNano 1.1.1 that is distributed as part of MoP2 (https://github.com/biocorecrg/MOP2)

Hope this helps! Eva

liuqianhn commented 1 year ago

Hi @enovoa Thank you very much for your help. I can run the docker. I also have several questions to run epinano

  1. What is output of Epinano_Variants.py?
  2. What is output of Epinano_Current.sh?
  3. What is output of Epinano_DiffErr.R?

Meanwhile, when I run Epinano_Current.sh, I only see *.bam.forward.reads and empty .eventalign.tsv.gz. May I know what is wrong? There is no error message when I run docker. Thanks.

ixeft commented 1 year ago

The error come from the fact that sam2tsv.jar has change his command line usage, now it takes "-R" instead of "-r" for reference file. Unfortunately, EpiNano fail after the sam2tsv step, when trying to use the output of sam2tsv

enovoa commented 1 year ago

Hello, did you try the sam2tsv.jar that is included as part of the EpiNano repo? It seems you are using /bucket/.deigo/LuscombeU/live/charlottecapitanchik/software/jvarkit/dist/sam2tsv.jar

Regarding the dockerfile - can you please try with the demo/test data included in the repo? Thanks!

Madhurananda commented 1 year ago

Hi @CharlotteAnne @liuqianhn @enovoa @ixeft

I am using the latest Epinano 1.2 and also experienced the same issue: Process Process-2:

This usually happens when an empty job is provided to the multiprocessing, I believe. At line 99/103 inside Epinano_Variants.py; there is a command: f"samtools view -h -F 3860 {bam_file} | java -jar {sam2tsv} -r {reference_file} "\ f" | {awk_forward_strand}"

This will only return results when the Anaconda environment has the samtools installed, as required. I didn't have it installed initially, but I successfully generated the CSV files later.

I hope this helps.

Huanle commented 1 year ago

Hi @enovoa Thank you very much for your help. I can run the docker. I also have several questions to run epinano

  1. What is output of Epinano_Variants.py?
  2. What is output of Epinano_Current.sh?
  3. What is output of Epinano_DiffErr.R?

Meanwhile, when I run Epinano_Current.sh, I only see *.bam.forward.reads and empty .eventalign.tsv.gz. May I know what is wrong? There is no error message when I run docker. Thanks.

Hi @liuqianhn,

Sorry for the late chime in. There is a wiki that can help.

Huanle commented 1 year ago

The error come from the fact that sam2tsv.jar has change his command line usage, now it takes "-R" instead of "-r" for reference file. Unfortunately, EpiNano fail after the sam2tsv step, when trying to use the output of sam2tsv

Hi @ixeft ,

The sam2tsv.jar in the misc/ folder should work. Let me know if it works and sorry for the late reply.

Huanle