nanoporetech / pinfish

Tools to annotate genomes using long read transcriptomics data
Other
44 stars 13 forks source link

polish_clusters error? #16

Closed Renxiaoliang closed 4 years ago

Renxiaoliang commented 4 years ago

Hi, I am using "pipeline pinfish analysis" to annotate genome with ONT cDNA long reads. However, when it came to "polish_clusters" step, I got the error message like the following:

polish_clusters: 15:11:47 Failed running command: samtools view -h - exit status 1

[Wed Dec 18 15:11:47 2019]

Error in rule polish_clusters:

jobid: 7

output: results/polished_transcripts.fas

conda-env: /home/work/rxl_wkdir/wkdir_N06/pipeline-pinfish-analysis/.snakemake/conda/bfe8fba3

shell:        

/home/work/rxl_wkdir/wkdir_N06/pipeline-pinfish-analysis/pinfish/polish_clusters/polish_clusters -t 30 -a results/cluster_memberships.tsv -c 10 -o results/polished_transcripts.fas alignments/reads_aln_sorted.bam    

    (one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!)

Shutting down, this might take some time.

I do install minimap2, samtools, and racon as dependencies, but I don't know how did this error happen. Could anybody give some advices on this? Thank you very much!

bsipos commented 4 years ago

Did you install samtools through a package manager? If yes, it is likely that it is too old. Please install mininconda and run the snakemake pipeline with --use-conda. Best, Botond

huangl07 commented 4 years ago

well I get the same error when I use samtools 1.10

bsipos commented 4 years ago

Well, the only explanation is that you don't have samtools in your path. If you use conda to manage dependencies this should not happen.

huangl07 commented 4 years ago

Well,bsipos,

I don't think so,course I could do which samtools and get samtools path

so I think maybe there is another answer

Maybe conda is necessary?

bsipos commented 4 years ago

Yeah, it seems your issue is not with samtools. Coult you please look at the files left in temp after the crash. It seems there was a problem with aligning the reads.

MartinTes commented 4 years ago

I have just got the same error both with my data and training data with Samtools version 1.19

huangl07 commented 4 years ago

Hi bsipos

I use make test_sim, but I got the error

$make test_sim ./polish_clusters -t 40 -c 100 -o test_data/cons.fas -a test_data/cls_sirv_sim_mm2.tab ../spliced_bam2gff/test_data/sirv_simulated.bam polish_clusters: 08:39:57 Failed running command: samtools view -h - exit status 1 make: *** [Makefile:45: test_sim] Error 1 I think maybe there are something wrong in your code

huangl07 commented 4 years ago

Hi bsipos

I think I found Why the errors couse when you test in utils.go samtools view -h

it run status is 1

when I change the utils.go to this: `func BashExec(command string) {

cmd := exec.Command("bash", "-c", command)
err := cmd.Run()
if strings.Contains(command, "samtools"){
    fmt.Println(err)
    fmt.Println("hello world")
}
if err != nil {
    L.Fatalf("Failed running command: %s - %s\n", command, err)
}

} `

it run out ./polish_clusters -t 40 -c 100 -o test_data/cons.fas -a test_data/cls_sirv_sim_mm2.tab ../spliced_bam2gff/test_data/sirv_simulated.bam exit status 1 hello world polish_clusters: 09:22:09 Failed running command: samtools view -h - exit status 1

huangl07 commented 4 years ago

Hi bsipos,I change the check command ”samtools view -h“ 2 "which samtools" in line 32 at file "check_deps.go "

and then the error is gone!

Renxiaoliang commented 4 years ago

Hi, huangl07, I did the modification as you mentioned and it did work with no error! I don't know the rationales underlying this but thank you very much!

Renxiaoliang commented 4 years ago

And also, I came to the same question in the ont_tutorial_pinfish pipeline, https://github.com/nanoporetech/ont_tutorial_pinfish

I degrade samtools from 1.10 to 1.9 through conda without changing any code, and the error is gone!

bsipos commented 4 years ago

Interesting, it seems something changed in samtools. Will look into this and pin the version if necessary.

Renxiaoliang commented 4 years ago

Hi bsipos, by the way, pychopper analysis step is not included in pipeline-pinfish-analysis, right? But for ONT cDNA reads, pychopper step is still recommonded before pipeline-pinfish-analysis?

I noticed that ont_tutorial_pinfish pipeline contains pychopper, so I am wondering what is the difference between pipeline-pinfish-analysis and ont_tutorial_pinfish. Which one should I choose? as it seems that ont_tutorial_pinfish shows more recent updates.

Thank you very much!

bsipos commented 4 years ago

Yes, pychopper is not included in the pipeline and you should do it manually for cDNA. The reason is that this pipeline meant to work on cDNA and direct RNA as well.