Changeset 5753


Ignore:
Timestamp:
Nov 22, 2019, 1:10:32 PM (3 years ago)
Author:
Nicklas Nordborg
Message:

References #1205: Variant calling fails with "malformed BED entry"

Fixes the gc_stat.py script so that it uses the correct sequence if the variant location is within the 50 first base pairs of a chromosome.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • other/pipeline/trunk/gc_stat.py

    r5747 r5753  
    99
    10100: Chromosome (printed to VCF#CHROM)
    11 1: Start (=original location - 50; not used)
     111: Start (=original location - 50; or 0 if original location < 50)
    12122: Stop (=original location + 50; not used)
    13133: Original location (printed to VCF#POS)
     
    3535# Column indexes from the BED file we are reading
    3636COL_CHR = 0
     37COL_START = 1
     38COL_END = 2
    3739COL_POS = 3
    3840COL_REF = 4
     
    7981    cols = line.rstrip().split('\t')
    8082    seq = cols[COL_SEQ]
    81     seqLocal = cols[COL_SEQ][NORM_LEN-LOCAL_LEN:NORM_LEN+LOCAL_LEN]
     83    posInSeq = int(cols[COL_POS])-int(cols[COL_START])
     84    seqLocal = cols[COL_SEQ][max(posInSeq-LOCAL_LEN, 0):posInSeq+LOCAL_LEN]
    8285    gcNorm, strengthNorm = getSequenceInfo(seq)
    8386    gcLocal, strengthLocal = getSequenceInfo(seqLocal)
Note: See TracChangeset for help on using the changeset viewer.