12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- import pandas as pd
- ######################################################
- # config file
- ######################################################
- configfile: "config.yaml"
- ######################################################
- # read samples.txt to dict
- ######################################################
- SAMPLES = pd.read_csv(config["SAMPLES_FILE"], header=None, sep="\t").set_index(1, drop=False)[0].to_dict()
- f = open(config['contrasts'], 'r')
- CONTRASTS = [i.strip().replace('\t', '_vs_') for i in f.readlines()]
- ######################################################
- # result files
- ######################################################
- rule all:
- input:
- config["Assembly_Dir"] + "/trinity_out_dir.Trinity.fasta", # Trinity.fasta
- config["Assembly_Dir"] + "/trinity_out_dir.Trinity.fasta.txt", # Trinity assembly result statistics
- config["Assembly_Dir"] + "/corset.fasta", # corset.fasta
- config["Assembly_Dir"] + "/corset.fasta.txt", # corset cluster result statistics
- config["Assembly_Dir"] + "/corset-clusters_trans_map.txt", # corset cluster to transcript mapping
- config["Assembly_Dir"] + "/run_busco/short_summary_busco.txt", # busco result
- #config["Annotation_Dir"] + "/anno_stat.txt", # annotation statistics
- config["Quantification_Dir"] + "/my.gene.counts.matrix", # gene counts matrix
- config["Quantification_Dir"] + "/my.gene.TMM.EXPR.matrix", # TMP and TMM normalized matrix
- config["ExprAnalysis_Dir"] + "/sample_cor/my.minRow10.sample_cor.dat", # sample correlation
- config["ExprAnalysis_Dir"] + "/sample_cor/my.minRow10.sample_cor_matrix.pdf", # sample correlation plot
- config["ExprAnalysis_Dir"] + "/pca/my.minRow10.PCA.prcomp.scores", # sample PCA
- config["ExprAnalysis_Dir"] + "/pca/my.minRow10.prcomp.principal_components.pdf", # sample PCA plot
- expand(config["ExprAnalysis_Dir"] + "/deg/my.gene.counts.matrix.{vs}.DESeq2.DE_results", vs=CONTRASTS)
- #expand(config["ExprAnalysis_Dir"] + "/deg/my.gene.counts.matrix.{vs}.DESeq2.DE_results.ekp_results.txt", vs = CONTRASTS)
- ######################################################
- # Includes
- ######################################################
- include: "Includes/Assembly.snake"
- #include: "Includes/Annotation.snake"
- include: "Includes/Mapping_Denovo.snake"
- include: "Includes/Quantification_Denovo.snake"
- include: "Includes/ExprAnalysis.snake"
|