Snakefile.denovo 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import pandas as pd
  2. ######################################################
  3. # config file
  4. ######################################################
  5. configfile: "config.yaml"
  6. ######################################################
  7. # read samples.txt to dict
  8. ######################################################
  9. SAMPLES = pd.read_csv(config["SAMPLES_FILE"], header=None, sep="\t").set_index(1, drop=False)[0].to_dict()
  10. f = open(config['contrasts'], 'r')
  11. CONTRASTS = [i.strip().replace('\t', '_vs_') for i in f.readlines()]
  12. ######################################################
  13. # result files
  14. ######################################################
  15. rule all:
  16. input:
  17. config["Assembly_Dir"] + "/trinity_out_dir.Trinity.fasta", # Trinity.fasta
  18. config["Assembly_Dir"] + "/trinity_out_dir.Trinity.fasta.txt", # Trinity assembly result statistics
  19. config["Assembly_Dir"] + "/corset.fasta", # corset.fasta
  20. config["Assembly_Dir"] + "/corset.fasta.txt", # corset cluster result statistics
  21. config["Assembly_Dir"] + "/corset-clusters_trans_map.txt", # corset cluster to transcript mapping
  22. config["Assembly_Dir"] + "/run_busco/short_summary_busco.txt", # busco result
  23. #config["Annotation_Dir"] + "/anno_stat.txt", # annotation statistics
  24. config["Quantification_Dir"] + "/my.gene.counts.matrix", # gene counts matrix
  25. config["Quantification_Dir"] + "/my.gene.TMM.EXPR.matrix", # TMP and TMM normalized matrix
  26. config["ExprAnalysis_Dir"] + "/sample_cor/my.minRow10.sample_cor.dat", # sample correlation
  27. config["ExprAnalysis_Dir"] + "/sample_cor/my.minRow10.sample_cor_matrix.pdf", # sample correlation plot
  28. config["ExprAnalysis_Dir"] + "/pca/my.minRow10.PCA.prcomp.scores", # sample PCA
  29. config["ExprAnalysis_Dir"] + "/pca/my.minRow10.prcomp.principal_components.pdf", # sample PCA plot
  30. expand(config["ExprAnalysis_Dir"] + "/deg/my.gene.counts.matrix.{vs}.DESeq2.DE_results", vs=CONTRASTS)
  31. #expand(config["ExprAnalysis_Dir"] + "/deg/my.gene.counts.matrix.{vs}.DESeq2.DE_results.ekp_results.txt", vs = CONTRASTS)
  32. ######################################################
  33. # Includes
  34. ######################################################
  35. include: "Includes/Assembly.snake"
  36. #include: "Includes/Annotation.snake"
  37. include: "Includes/Mapping_Denovo.snake"
  38. include: "Includes/Quantification_Denovo.snake"
  39. include: "Includes/ExprAnalysis.snake"