예제 #1
0
                                "_data/filter.benchmark")
demultiplexFQBench = ""
if snakemake.config["demultiplexing"][
        "demultiplex"] == "T" and snakemake.config["demultiplexing"][
            "create_fastq_files"] == "T":
    demultiplexFQBench = readBenchmark(
        snakemake.wildcards.PROJECT + "/runs/" + snakemake.wildcards.run +
        "/" + snakemake.wildcards.sample +
        "_data/demultiplexed/demultiplex_fq.benchmark")

################################################################################
#                           Compute Counts                                     #
################################################################################
if snakemake.config["gzip_input"] == "F":
    rawCounts = countFasta(
        snakemake.wildcards.PROJECT + "/samples/" +
        snakemake.wildcards.sample + "/rawdata/fw.fastq", True)
else:
    rawCounts = countFastaGZ(
        snakemake.wildcards.PROJECT + "/samples/" +
        snakemake.wildcards.sample + "/rawdata/fw.fastq.gz", True)
#rawCountsStr= '{0:g}'.format(float(rawCounts))
rawCountsStr = str(int(rawCounts))
#-peared
pearedCounts = 0
if snakemake.config["UNPAIRED_DATA_PIPELINE"] != "T":
    pearedCounts = countFasta(
        snakemake.wildcards.PROJECT + "/runs/" + snakemake.wildcards.run +
        "/" + snakemake.wildcards.sample + "_data/peared/seqs.assembled.fastq",
        True)
else:
예제 #2
0
    splitLibsRCBench =readBenchmark(snakemake.wildcards.PROJECT+"/runs/"+snakemake.wildcards.run+"/"+snakemake.wildcards.sample+"_data/splitLibsRC/splitLibs.benchmark")
    combineBench =readBenchmark(snakemake.wildcards.PROJECT+"/runs/"+snakemake.wildcards.run+"/"+snakemake.wildcards.sample+"_data/combine_seqs_fw_rev.benchmark")
else:
    combineBench=pearBench #THIS IS ONLY FOR TESTING REMOVE!!! 
rmShorLongBench = ""
if snakemake.config["ANALYSIS_TYPE"] == "OTU": 
    rmShorLongBench = readBenchmark(snakemake.wildcards.PROJECT+"/runs/"+snakemake.wildcards.run+"/"+snakemake.wildcards.sample+"_data/filter.benchmark")
demultiplexFQBench=""
if snakemake.config["demultiplexing"]["demultiplex"] == "T" and snakemake.config["demultiplexing"]["create_fastq_files"] == "T":
    demultiplexFQBench =readBenchmark(snakemake.wildcards.PROJECT+"/runs/"+snakemake.wildcards.run+"/"+snakemake.wildcards.sample+"_data/demultiplexed/demultiplex_fq.benchmark")

################################################################################
#                           Compute Counts                                     #
################################################################################
if snakemake.config["gzip_input"] == "F":
    rawCounts = countFasta(snakemake.wildcards.PROJECT+"/samples/"+snakemake.wildcards.sample+"/rawdata/fw.fastq", True);
else:
    rawCounts = countFastaGZ(snakemake.wildcards.PROJECT+"/samples/"+snakemake.wildcards.sample+"/rawdata/fw.fastq.gz", True);
rawCountsStr= str(int(rawCounts))
#rawCountsStr= '{0:g}'.format(float(rawCounts))
#-peared
pearedCounts = 0
if snakemake.config["UNPAIRED_DATA_PIPELINE"] != "T":
    pearedCounts = countFasta(snakemake.wildcards.PROJECT+"/runs/"+snakemake.wildcards.run+"/"+snakemake.wildcards.sample+"_data/peared/seqs.assembled.fastq", True);
else:
    pearedCounts = countFasta(snakemake.wildcards.PROJECT+"/runs/"+snakemake.wildcards.run+"/"+snakemake.wildcards.sample+"_data/peared/seqs.assembled.UNPAIRED.fastq", True);

pearedCountsStr=str(int(pearedCounts))
#pearedCountsStr='{0:g}'.format(float(pearedCounts))
prcPeared = "{:.2f}".format(float((pearedCounts/rawCounts)*100))
#-dumultiplex