Entering edit mode
11 months ago
dlera.lozano
▴
10
Hi! As the title says I have been trying to generate a bam file using a sam file generated from minimap2. Here is the script I am using to generated the SAM file.
#Variables
export ASSEMBLY=PATH/BC01_racon3.fasta
export PFX=BC01_BLOB
export READS=PATH/barcode01_trimmed100.fastq
#Commands
PATH/minimap2 -t $SLURM_NTASKS $ASSEMBLY $READS > ${PFX}.sam
Once this file is generated I attempt to use the following:
samtools view -b BC01_BLOB.sam > BC01_BLOB.bam
And I recieve the following error:
[E::sam_parse1] missing SAM header
[W::sam_read1] parse error at line 1
[main_samview] truncated file.
Any help would be greatly appreciated! I just started working in bash recently so I really don't have much experience. I am trying to get a bam file for blobtools.
I think the conversion is running now without issue, Thank you so much!
Great. You can accept the answer (green check mark) to provide closure to this thread.