Changeset 5752


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

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

Fixes the BED file so that 0 is written instead of a negative value.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/branches/4.24-stable/src/net/sf/basedb/reggie/grid/VariantCallingJobCreator.java

    r5736 r5752  
    401401        script.comment("and run that through gc_stat.py which produces a VCF file that vcfanno can use");
    402402        script.comment("to add back annotations to the VCF file from VarDict");
    403         script.cmd("awk '{OFS=\"\\t\"; if (!/^#/){print $1,$2-50,$2+50,$2,$4,$5}}' tmp/variants-raw-1.vcf > tmp/gc-50.bed");
     403        script.cmd("awk '{OFS=\"\\t\"; if (!/^#/){print $1,($2<50)?0:$2-50,$2+50,$2,$4,$5}}' tmp/variants-raw-1.vcf > tmp/gc-50.bed");
    404404        script.cmd(bedtools_path+" getfasta -fi ${Genome} -bed tmp/gc-50.bed -bedOut > tmp/gc-50-fasta.bed");
    405405        script.cmd("cat tmp/gc-50-fasta.bed | ./gc_stat.py | bgzip -c > tmp/gc-50.vcf.gz");
Note: See TracChangeset for help on using the changeset viewer.