瀏覽代碼

remove some rule

zhangxudong 5 月之前
父節點
當前提交
c18a723e7d
共有 4 個文件被更改,包括 10 次插入52 次删除
  1. 5 43
      Snakefile
  2. 5 9
      config.yaml
  3. 0 0
      ref/genome.chrom.list
  4. 0 0
      ref/genome.gtf

+ 5 - 43
Snakefile

@@ -11,8 +11,8 @@ GENOME = config["genome"]
 RESOLUTIONS = config["resolutions"]
 BASE_RESOLUTION = min(RESOLUTIONS)
 
-with open('chromosomes.txt', 'r') as file:
-    CHROMOSOMES = [line.strip() for line in file]
+#with open('chromosomes.txt', 'r') as file:
+#    CHROMOSOMES = [line.strip() for line in file]
 
 
 meta_data = pd.read_csv('samples.txt', sep='\t')
@@ -39,19 +39,15 @@ rule all:
         #第四步: 格式转换
         expand("Matrix/Final/{sample}.{format}", sample=SAMPLES, format=["mcool"]),
         #第五步: 接触矩阵质控
-        "Matrix/Raw/hicQC.html",
-        "Matrix/Raw/SCC.csv",
+        #"Matrix/Raw/hicQC.html",
+        #"Matrix/Raw/SCC.csv",
         expand("Matrix/Final/{sample}_res.csv", sample=SAMPLES),
         #第六步: AB compartment, TADs, Loops
-        expand("Matrix/Diff/{resolution}/{contrast}.cool", resolution=config["TAD_resolution"], contrast=CONTRASTS),
         expand("Compartments/CALDER2/{resolution}/{sample}/sub_compartments/all_sub_compartments.bed", resolution=config["Compartment_resolution"], sample=SAMPLES),
         expand("TADs/HiCExplorer/{resolution}/{sample}_domains.bed", resolution=config["TAD_resolution"], sample=SAMPLES),
         expand("TADs/HiCExplorer/{resolution}/{contrast}_accepted.diff_tad", resolution=config["TAD_resolution"],contrast=CONTRASTS),
         expand("Loops/Mustache/{resolution}/{sample}.tsv", resolution=config["Loop_resolution"], sample=SAMPLES),
-        expand("Loops/Mustache/{resolution}/{contrast}.diffloop1", resolution=config["Loop_resolution"], contrast=CONTRASTS),
-        # 可视化
-        expand("plots/{resolution}/{sample}_plotmatrix_allchr.png", resolution=config["Plot_matrix_resolution"], sample=SAMPLES),
-        expand("plots/{resolution}/{sample}_plotmatrix_perchr.png", resolution=config["Plot_matrix_resolution"], sample=SAMPLES)
+        expand("Loops/Mustache/{resolution}/{contrast}.diffloop1", resolution=config["Loop_resolution"], contrast=CONTRASTS)
 
  
 #********************************************************#
@@ -451,37 +447,3 @@ rule diff_mustache:
         """
         python /opt/conda/lib/python3.12/site-packages/mustache/diff_mustache.py -f1 {input.treatment_mcool} -f2 {input.control_mcool} --resolution {params.resolution} --outfile {params.prefix} --processes {threads} {params.diff_mustache}
         """
-
-#********************************************************#
-#                       可视化                           #
-#********************************************************#
-rule hicPlotMatrix:
-    input:
-        mcool="Matrix/Final/{sample}.mcool"
-    output:
-        allchr_png="plots/{resolution}/{sample}_plotmatrix_allchr.png",
-        perchr_png="plots/{resolution}/{sample}_plotmatrix_perchr.png"
-    params:
-        resolution="{resolution}"
-    shell:
-        """
-        hicPlotMatrix -m {input.mcool}::/resolutions/{params.resolution} -o {output.allchr_png} --log1p --colorMap YlOrRd --clearMaskedBins --log1p
-        hicPlotMatrix -m {input.mcool}::/resolutions/{params.resolution} -o {output.perchr_png} --log1p --colorMap YlOrRd --clearMaskedBins --perChromosome --log1p
-        """
-
-# 使用 hicCompareMatrices 比较矩阵
-rule hicCompareMatrices:
-    input:
-        treatment_mcool="Matrix/Final/{treatment}.mcool",
-        control_mcool="Matrix/Final/{control}.mcool",
-    output:
-        cool="Matrix/Diff/{resolution}/{treatment}_vs_{control}.cool"
-    params:
-        resolution="{resolution}"
-    singularity:
-        HICSNAKE_HOME + "/sifs/hicexplorer_20240327.sif"
-    threads: 6
-    shell:
-        """
-        hicCompareMatrices --matrices {input.treatment_mcool}::resolutions/{params.resolution} {input.control_mcool}::resolutions/{params.resolution} --operation log2ratio -o {output.cool}
-        """

+ 5 - 9
config.yaml

@@ -2,7 +2,7 @@
 # globe  
 #######################
 # HiCSnake 流程所在位置
-HICSNAKE_HOME: /home/zhxd/workspace/20240527_HiC/HicSnake
+HICSNAKE_HOME: /home/u023/workspace/Pepper2024
 # 基因组前缀 ref/$genome.fa
 genome: genome
 # 酶的识别位点
@@ -52,14 +52,10 @@ hicrep: "--h 20 --dBPMax 500000"
 hicres: "--resolutions 1000,2000,5000,10000"
 # 使用 Calder2 检测 subcompartment, -f 指定 feature track, --chr_prefix 指定原染色体前缀,需要统一
 calder: "-g others -f ref/gene_density.bed --chr_prefix Chr"
-#  
+# TAD 检测 
 hicFindTADs: " --correctForMultipleTesting fdr --thresholdComparisons 0.01 --delta 0.01"
 hicDifferentialTAD: "--pValue 0.05 --mode all --modeReject one"
-hicDetectLoops: "--maxLoopDistance 2000000 --windowSize 10 --peakWidth 6 --pValuePreselection 0.05 --pValue 0.05"
-  #mustache: "-pt 0.05 -st 0.88"
-mustache: ""
-  #diff_mustache: "-pt 0.05 -pt2 0.05 -st 0.88"
-diff_mustache: ""
+# Loops 检测
+mustache: "" # -pt 0.05 -st 0.88
+diff_mustache: "" # -pt 0.05 -pt2 0.05 -st 0.88
 hicPlotDistVsCounts: ""
-
-stripenn: "" 

+ 0 - 0
ref/genome.chrom.list


+ 0 - 0
ref/genome.gtf