Esempio n. 1
0
def actual_alignment(args):
    blue("Going for STAGE_1 - actual_alignment")
    with cwd(joiner(args.hg, "chromFa")):
        cmds = [
            "module add " + ngs_tools_dict["bwa"] + " && bwa aln -t 4 -f input.sai hg19 input.fastq",
            "module add "
            + ngs_tools_dict["bwa"]
            + ' && bwa samse -f out.sam -r "@RG\tID:bwa\tLB:Exome1Lib\tSM:Exome1Sampl\tPL:ILLUMINA" hg19 input.sai input.fastq',
        ]
        run_commands(cmds, Exception)
    ok("done")
Esempio n. 2
0
def quality_score_recalibration(args):
    blue("Going for STAGE_5 - quality_score_recalibration")
    with cwd(joiner(args.hg, "chromFa")):
        cmds = [
            "module add "
            + ngs_tools_dict["GATK"]
            + " && $GATK_RUN -T BaseRecalibrator -R hg19.fa -I input_bam.marked.realigned.fixed.bam -L chr20 -knownSites dbsnp_138.hg19.vcf -o recal_data.table",
            "module add "
            + ngs_tools_dict["GATK"]
            + " && $GATK_RUN -T PrintReads -R hg19.fa -I input_bam.marked.realigned.fixed.bam -L chr20 -BQSR recal_data.table -o recal_reads.bam",
        ]
        run_commands(cmds, Exception)
    ok("Done!")
Esempio n. 3
0
def local_realignment(args):
    blue("Going for STAGE_4 - local_realignment")
    with cwd(joiner(args.hg, "chromFa")):
        cmds = [
            "module add "
            + ngs_tools_dict["GATK"]
            + " && $GATK_RUN -T RealignerTargetCreator -R hg19.fa -o input.bam.list -I output.marked.bam",
            "module add "
            + ngs_tools_dict["GATK"]
            + " && $GATK_RUN -I output.marked.bam -R hg19.fa -T IndelRealigner -targetIntervals input.bam.list -o input.marked.realigned.bam",
            "module add "
            + ngs_tools_dict["Picard"]
            + " && $PICARDRUN FixMateInformation INPUT=input.marked.realigned.bam OUTPUT=input_bam.marked.realigned.fixed.bam SO=coordinate VALIDATION_STRINGENCY=LENIENT CREATE_INDEX=true",
        ]
        run_commands(cmds, Exception)
    ok("Done!")