mritchielab / FLAMES

A framework for performing single-cell and bulk read full-length analysis of mutations and splicing.
https://mritchielab.github.io/FLAMES/
GNU General Public License v3.0
20 stars 9 forks source link

'asBam' failed to open SAM/BAM file #29

Closed nick-youngblut closed 7 months ago

nick-youngblut commented 7 months ago

At the very start of the sc_long_pipeline pipeline, I'm getting the following error:

Warning: error in running commandError in value[[3L]](cond) : 'asBam' failed to open SAM/BAM file
  file: '/home/rstudio/workspace//data/SspArc0008_10x_cDNA_longRead//flames/tmp_align.sam'
  SAM file: '/home/rstudio/workspace//data/SspArc0008_10x_cDNA_longRead//flames/tmp_align.sam'

The tmp_align.sam file exists in the target directory. The only other file in the directory is tmp_splice_anno.bed12.

Although the error message appears, the pipeline continues, suggesting that the pipeline is not correctly handling errors in child processes and instead of killing the main job (the sc_long_pipeline job), the main job keeps going and calling subsequent child processes.

I'm using FLAMES v1.8.0.

ChangqingW commented 7 months ago

Can you check if the sam file is intact? I wonder if something has gone wrong with minimap2.

nick-youngblut commented 7 months ago

That SAM file is empty.

minimap2 and paftools.js are in the path, and I'm also setting the path to minimap2 via the sc_long_pipeline(minimap2_dir = ) parameter.

nick-youngblut commented 7 months ago

After installing samtools, I no longer get the error. It's an issue with Rsamtools.

nick-youngblut commented 7 months ago

Which version(s) of samtools (and minimap2) are valid with FLAMES?

It could be helpful to include that info in the SystemRequirements: section of the DESCRIPTION file. For example:

SystemRequirements: GNU make, C++17, samtools (>= 1.14), minimap2 (>= 2.28)

...with the same going for BLAZE and any other non-R dependencies.

A conda environment yaml could also help users. Such as:

name: flames_env
channels:
- conda-forge
- bioconda
dependencies:
- samtools>=1.14
- minimap2>=2.28
nick-youngblut commented 7 months ago

Thanks @ChangqingW for making the updates!