Closed PanZiwei closed 2 years ago
Can you provide the command you are using without variables? I suspect something is incorrect in your arguments or your reference file is incorrect somehow
@cjw85 Thanks for the reply! See the command below.
modbam2bed -e -m 5mC --cpg -t 30 /reference/T2T.fna /test/test.merged.sorted.bam > /test/test.bed
The message:
[E::fai_retrieve] Failed to retrieve block: unexpected end of file
suggests an error reading sequences from you T2T.fna file. Can you check that this file is complete, not currupt, and its corresponding index file is up to date.
Thanks for the tips! I reprepare the .fna
and .fna.fai
and it indeed worked.
Thanks again for your help! I will close the ticket.
Sorry to interrupt again. One following question will be: I assume the alignment is done inside the Guppy when adding the --align_ref
step so that the output bam file is aligned already? In other words, there is no need to do the minimap2 for alignment right?
Correct, the --align_ref
option in Guppy enables alignment to a reference.
Hi, Thanks for the amazing tool. I am trying to use the tool to get bed filles but got an unexpected error.
For
modbam2bed
, i am using the command below:modbam2bed -e -m 5mC --cpg -t ${THREAD} ${REF_FASTA} ${OUTPUT_BAM} > ${OUTPUT_BED}
The error message is:
Here is what I did: Guppy base-calling with modification model with
--align_ref
for fastq output -> Minimap2 to align fastq for sam files -> Usesamtools
to convert sam file to get bam file (sorted and indexed) -> Merged bam files -> Rerunsamtools
to sort and index the merged bam file -> Runmodbam2bed
on the bam fileWould really appreciate it if you can provide hints to solve the problem! I saw a similar issue on https://github.com/epi2me-labs/modbam2bed/issues/6 but am not sure about the solution.