thomasvangurp / epiGBS

Code for working with epiGBS data
MIT License
10 stars 7 forks source link

OverFlowError in mergeBSv3.py #27

Open FleurGaBru opened 4 years ago

FleurGaBru commented 4 years ago

I am trying to tun the code from the Nature methods, but I get the following error:

Traceback (most recent call last):
  File "de_novo_reference_creation/mergeBSv3.py", line 364, in <module>
    sam_record = create_SAM_line(cluster_instance)
  File "de_novo_reference_creation/mergeBSv3.py", line 225, in create_SAM_line
    record.mapq = len(cluster_obj.read.seq)
  File "pysam/libcalignedsegment.pyx", line 2172, in pysam.libcalignedsegment.AlignedSegment.mapq.__set__ (pysam/libcalignedsegment.c:23751)
  File "pysam/libcalignedsegment.pyx", line 915, in pysam.libcalignedsegment.AlignedSegment.mapping_quality.__set__ (pysam/libcalignedsegment.c:11810)
OverflowError: value too large to convert to uint8_t

The command, I am running is:

python2 de_novo_reference_creation/mergeBSv3.py -s /tmp/join_combinedY4HDKJ_demethylated.assembled.derep.fastq -c /tmp/join_crickY4HDKJ_demethylated.ass
embled.derep.fastq --clusters /tmp/derep_merged.uc --samout /tmp/merged.sam

With

(epiGBS) fleurg@nioo0025:/mnt/nfs/bioinfdata/home/NIOO/fleurg/projects/epigbs-nature$ head /tmp/derep_merged.uc
S       0       100     *       *       *       *       *       c350663/1;size=33;      *
H       0       100     100.0   +       0       0       *       w63899/1;size=17;       c350663/1;size=33;
S       1       100     *       *       *       *       *       c148173/1;size=19;      *
H       1       100     100.0   +       0       0       *       w184096/1;size=9;       c148173/1;size=19;
S       2       100     *       *       *       *       *       c75487/1;size=18;       *
H       2       100     100.0   +       0       0       *       w131193/1;size=16;      c75487/1;size=18;
S       3       100     *       *       *       *       *       c615306/1;size=16;      *
H       3       100     100.0   +       0       0       *       w155120/1;size=3;       c615306/1;size=16;
S       4       100     *       *       *       *       *       c38465/1;size=15;       *
H       4       100     100.0   +       0       0       *       w76817/1;size=8;        c38465/1;size=15;

(epiGBS) fleurg@nioo0025:/mnt/nfs/bioinfdata/home/NIOO/fleurg/projects/epigbs-nature$ head /tmp/join_combinedY4HDKJ_demethylated.assembled.derep.fastq
>c54888/1;size=44;
TAATACAAATATTAACATTTTAATTCTAAACTTCAACAAATTATATTAATATTCAAAACAATTTTATACTAAAACAATAA
ATAACTTCTCACAATATACA
>c145916/1;size=36;
TAATAAATTTCATCAAATTAACACATCATATTAATAACTAAAAATAATATACACATTTTTTTCACTATATCAAAATTTAA
ACTCACAAAAATTAAATACA
>c350663/1;size=33;
TAATATTTCCAAATATAATTATAATTATCAAATTTAATCTAACAACTCATTTAATATAAAATAAAACATCAAATATTTAA
TATCTTATTACATTCATACA
>c14573/1;size=32;

(epiGBS) fleurg@nioo0025:/mnt/nfs/bioinfdata/home/NIOO/fleurg/projects/epigbs-nature$ head /tmp/join_crickY4HDKJ_demethylated.assembled.derep.fastq
>54888/1;size=44;
TAATACAAATATTAACATTTTAATTCTAAACTTCAACAAATTATATTAATATTCAAAACAATTTTATACTAAAACAATAA
ATAACTTCTCACAATATACA
>145916/1;size=36;
TAATAAATTTCATCAAATTAACACATCATATTAATAACTAAAAATAATATACACATTTTTTTCACTATATCAAAATTTAA
ACTCACAAAAATTAAATACA
>350663/1;size=33;
TAATATTTCCAAATATAATTATAATTATCAAATTTAATCTAACAACTCATTTAATATAAAATAAAACATCAAATATTTAA
TATCTTATTACATTCATACA
>14573/1;size=32;

It also appears, when there is no "/1".

Any idea why this error occurs?