def pipeSaklSE(strain, p1, p2):
    reads = "/Volumes/BioSan/Users/friedrich/GB-3G/Reads/Run5/s_%s_all-trim.fq" % (strain)
    repOut = "/Volumes/BioSan/Users/pjung/Documents/GB-3G/BWA/Nuclear/Recombinaison/%s" % strain
    ref = "/Volumes/BioSan/Users/friedrich/GB-3G/SequenceReference/Sakl/Index/BWA/saklRef.fasta"

    if not os.path.isdir(repOut):
        os.mkdir(repOut)

    cmdA = "chmod 777 %s" % repOut
    os.system(cmdA)

    outBWA = "aln_%s" % strain
    opt = ""
    if not "Run3" in reads and not "Run4" in reads and not "Run5" in reads:
        opt += "-I"
    opt += " -n 5 -o 1"

    ficSam = traitementBWA.lanceBWAsamse(outBWA, reads, repOut, ref, opt)
    ficVarFilter = traitementSamtools.lancePipeSamtoolsRecomb(ficSam, ref)
    ficOri = definiProvenanceSeg(strain, p1, p2)
    #ficOri = "ori81b.tab"
    ficOriNew = postTraiteProvenanceSeg(ficOri, strain)
def pipeSaklPE(strain, p1, p2):
    reads1 = "/Volumes/BioSan/Users/friedrich/GB-3G/Reads/Run6/CleanPE/s_1_%s-trim.fq" % (strain)
    reads2 = "/Volumes/BioSan/Users/friedrich/GB-3G/Reads/Run6/CleanPE/s_2_%s-trim.fq" % (strain)
    repOut = "/Volumes/BioSan/Users/pjung/Documents/GB-3G/BWA/Nuclear/Recombinaison/%s" % strain
    ref = "/Volumes/BioSan/Users/friedrich/GB-3G/SequenceReference/Sakl/Index/BWA/saklRef.fasta"

    if not os.path.isdir(repOut):
        os.mkdir(repOut)

    cmdA = "chmod 777 %s" % repOut
    os.system(cmdA)

    outBWA = "aln_%s_1" % strain
    opt = ""
    if not "Run3" in reads1 and not "Run4" in reads1:
        opt += "-I"
    opt += " -n 8 -o 2"

    ficSam = traitementBWA.lanceBWA(outBWA, reads1, reads2, repOut, ref, opt)
    ficVarFilter = traitementSamtools.lancePipeSamtoolsRecomb(ficSam, ref)
    ficOri = definiProvenanceSeg(strain, p1, p2)
    ficOriNew = postTraiteProvenanceSeg(ficOri, strain)