ksahlin / BESST_RNA

Scaffolding of genomic assemblies with RNA seq data
15 stars 1 forks source link

ZeroDivisionError while running BESST_RNA #3

Closed culpinnis closed 9 years ago

culpinnis commented 9 years ago

Hi,

I wanted to try BESST_RNA, but it always fails with my input data.

Following means the path to my working directory.

The file 1_CAR15_trim_2_CAR_15_trim_vs_assembly3_WGSMorex_renamed_blastable.sorted.bam is a mapping of Ilummina RNA-seq paired-end reads which were mapped against the reference file assembly3_WGSMorex_renamed_blastable.fasta with the BWA mem algorithm and standard parameters.

bash-4.2$ python Main.py 1 -c <long prefix> /Barley/assembly3_WGSMorex_renamed_blastable.fasta -f <long prefix> /Barley/bam/all/1_CAR15_trim_2_CAR_15_trim_vs_assembly3_WGSMorex_renamed_blastable.sorted.bam -o ../../Barley/290915/
Main.py:224: UserWarning: parameter -g (treating haplotypic regions) inactivated, parameters -a and -b will not have any effect if specified.
  warnings.warn('parameter -g (treating haplotypic regions) inactivated, parameters -a and -b will not have any effect if specified. ')
Starting scaffolding with library:  <long prefix> /Barley/bam/all/1_CAR15_trim_2_CAR_15_trim_vs_assembly3_WGSMorex_renamed_blastable.sorted.bam
Parsing BAM file...
Computing parameters not set by user...
morex_contig_1558480
Traceback (most recent call last):
  File "Main.py", line 247, in <module>
    options.mapquality)
  File "Main.py", line 79, in Main
    (G, Contigs, Scaffolds, F, param) = CG.PE(Contigs, Scaffolds, F, Information, output_dest, C_dict, param)      #Create graph, single out too short contigs/scaffolds and store them in F
  File "<long prefix> /tooltest/best-rna/BESST_RNA/src/CreateGraph.py", line 32, in PE
    GetParams(bam_file, param, Scaffolds, C_dict, F, Contigs)
  File "<long prefix> /tooltest/best-rna/BESST_RNA/src/CreateGraph.py", line 454, in GetParams
    param.read_len = tot_read_len / float(nr_reads)
ZeroDivisionError: float division by zero

Regards Chris

ksahlin commented 9 years ago

Hi,

It seems that it is one of the following problems:

I've pushed a version with some debug printing to stdout that you cold try that might shed more light on to what is happening.

Thanks for you report and get back to me.

Best, Kristoffer

culpinnis commented 9 years ago

Thanks for your fast answer. I will check the identifiers, because we may changed them in the project.If this will not help, I would also try the debug version, because i really want to test besst_rna. Kind regards Chris Am 30.09.2015 6:23 nachm. schrieb "Kristoffer" notifications@github.com:

Hi,

It seems that it is one of the following problems:

  • The accessions in the contigs file are different forom the accessions in bam file.
  • No read maps to either one of the 1000 largest contigs. This is unlikely if data is correct and suggests that there could be some bug in the alignments in the bam file, or a bug from BESST_RNA, can you verify that there are reads that are mapped in the bam file?

I've pushed a version with some debug printing to stdout that you cold try that might shed more light on to what is happening.

Thanks for you report and get back to me.

Best, Kristoffer

— Reply to this email directly or view it on GitHub https://github.com/ksahlin/BESST_RNA/issues/3#issuecomment-144466425.

culpinnis commented 9 years ago

Hi, I checked the identifiers as supposed. The identifiers are correct and formatted in the way "morex_contig_contignumber". I am working on the number of mapped reads currently.

culpinnis commented 9 years ago

I can verify that there are mapped reads on the 1000 longest contigs. But there are contigs which have no coverage at all: Could this be a problem? A small assortment of the longest contigs an the number of mapped reads is shown in the graphic. bildschirmfoto 2015-10-07 um 12 28 39

ksahlin commented 9 years ago

Hi again Chris!

It was a bug from BESST_RNA, caused by no mapped reads to the largest contig. I have now hopefully fixed this and pushed the new code to github. Let me know if it works.

Best, Kristoffer

culpinnis commented 9 years ago

Hi Kristoffer, It is working fine now! Thanks a lot :)