Skip to content

count-errors.py: IndexError: list index out of range #1

@alantsangmb

Description

@alantsangmb

Hi Nick,
I have tried on the nanopore scripts but encounter some problems.
Hope you can give me some advice.

I have used your Ecoli nanopore-r9 2d data as the input.

When running bwa, I found this one line command doesn't work for me:
bwa mem -t8 -xont2d NC_000913.fna E_coli_K12_1D_R9.2_SpotON_2.pass.fasta | samtools view -bS - | samtools sort - -o E_coli_K12_1D_R9.2_SpotON_2.sorted.bam

So I have splited them as follow and though I don't actually know what the parameter -xont2d means and no space after -t?:

  1. bwa mem -t8 -xont2d NC_000913.fna R9_Ecoli.fasta
  2. samtools view -o R9_Ecoli_aln.bam -bS R9_Ecoli.sam
  3. samtools sort R9_Ecoli_aln.bam R9_Ecoli_aln.sorted

Everything seems fine for these steps, so I continue to run your nanopore script, expand-cigar.py:
python expand-cigar.py --bam R9_Ecoli_aln.sorted.bam --fasta NC_000913.fna > R9_Ecoli_aln.sorted.expanded.bam

There is no error return from expand-cigar, but when I run count-errors.py:
python count-errors.py R9_Ecoli_aln.sorted.expanded.bam
Error occured as:

Traceback (most recent all last):
File "count-errors.py", line 80, in
read_type = query.split('_')[4]
IndexError: list index out of range

Do you have any idea about this error? Is it due to no query in my best_align?
Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions