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
17 stars 9 forks source link

Error: with minimap2 alignment and samtools #21

Closed drafzalsyed closed 6 months ago

drafzalsyed commented 7 months ago

Hi I am running sc_long_pipeline on nanopore sequencing data. Here is my code and version info:

library(FLAMES)
# load the objects
fastq= demultiplexed_fastq (these files were generated by the sc_long_pipeline)

sc_long_pipeline(annotation = hg.gtf, fastq = demultiplexed_fastq, outdir = output, genome_fa = hg19.fa, barcodes_file = reference_csv, config_file = config)

#demultiplexing in config file turned to false

Then I end up with the following error:

### Aligning reads to genome using minimap2
05:39:40 PM Thu Feb 15 2024 minimap2_align
/software/samtools/1.19/bin/samtools
[main_samview] fail to read the header from "-".
[E::hts_open_format] Failed to open file "output/tmp_align.bam" : No such file or directory
samtools sort: can't open ".output/tmp_align.bam": No such file or directory

Before the minimap2 could finish the aligning reads to genome, samtools starts looking for bam files, and then fails in opening them. When the error happens the files are either empty or not created yet. I redacted the absolute path to the files in the error, but they are correct.

Could you please help me fix this error?

ChangqingW commented 7 months ago

I had this problem before and it turned out to be the minimap2 command got killed due to out of memory. If that is not the case for you, you could just run minimap2 manually beforehand and save the sorted and indexed bam as align2genome.bam under the output folder.

ChangqingW commented 6 months ago

Closing as there are no further responses.

drafzalsyed commented 6 months ago

Thank you for your suggestion! I just did as you suggested and it worked.