SnakeHichipTF 0.1.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. snakehichiptf-0.1.1/LICENSE +21 -0
  2. snakehichiptf-0.1.1/MANIFEST.in +5 -0
  3. snakehichiptf-0.1.1/PKG-INFO +322 -0
  4. snakehichiptf-0.1.1/README.md +298 -0
  5. snakehichiptf-0.1.1/SnakeHichipTF.egg-info/PKG-INFO +322 -0
  6. snakehichiptf-0.1.1/SnakeHichipTF.egg-info/SOURCES.txt +152 -0
  7. snakehichiptf-0.1.1/SnakeHichipTF.egg-info/dependency_links.txt +1 -0
  8. snakehichiptf-0.1.1/SnakeHichipTF.egg-info/entry_points.txt +8 -0
  9. snakehichiptf-0.1.1/SnakeHichipTF.egg-info/requires.txt +1 -0
  10. snakehichiptf-0.1.1/SnakeHichipTF.egg-info/top_level.txt +1 -0
  11. snakehichiptf-0.1.1/pyproject.toml +64 -0
  12. snakehichiptf-0.1.1/setup.cfg +4 -0
  13. snakehichiptf-0.1.1/setup.py +46 -0
  14. snakehichiptf-0.1.1/snakehichiptf/_version.py +5 -0
  15. snakehichiptf-0.1.1/snakehichiptf/cli.py +38 -0
  16. snakehichiptf-0.1.1/snakehichiptf/docs/Diffhichip.md +164 -0
  17. snakehichiptf-0.1.1/snakehichiptf/docs/Genomesetup.md +105 -0
  18. snakehichiptf-0.1.1/snakehichiptf/docs/Snakehichip.md +101 -0
  19. snakehichiptf-0.1.1/snakehichiptf/docs/TFscprinter.md +207 -0
  20. snakehichiptf-0.1.1/snakehichiptf/docs/TFtobias.md +65 -0
  21. snakehichiptf-0.1.1/snakehichiptf/docs/overview.png +0 -0
  22. snakehichiptf-0.1.1/snakehichiptf/organisms/all_motifs.txt +11730 -0
  23. snakehichiptf-0.1.1/snakehichiptf/organisms/basic.txt +96 -0
  24. snakehichiptf-0.1.1/snakehichiptf/rules/Diffhichip.Snakefile +146 -0
  25. snakehichiptf-0.1.1/snakehichiptf/rules/Genomesetup.Snakefile +538 -0
  26. snakehichiptf-0.1.1/snakehichiptf/rules/Snakehichip.Snakefile +1226 -0
  27. snakehichiptf-0.1.1/snakehichiptf/rules/TFscprinter.Snakefile +235 -0
  28. snakehichiptf-0.1.1/snakehichiptf/rules/TFtobias.Snakefile +231 -0
  29. snakehichiptf-0.1.1/snakehichiptf/rules/envs/basic.yaml +13 -0
  30. snakehichiptf-0.1.1/snakehichiptf/rules/envs/cooler.yaml +9 -0
  31. snakehichiptf-0.1.1/snakehichiptf/rules/envs/deeptools.yaml +6 -0
  32. snakehichiptf-0.1.1/snakehichiptf/rules/envs/diffloop.yaml +16 -0
  33. snakehichiptf-0.1.1/snakehichiptf/rules/envs/fithichip.yaml +20 -0
  34. snakehichiptf-0.1.1/snakehichiptf/rules/envs/genomefeature.yaml +12 -0
  35. snakehichiptf-0.1.1/snakehichiptf/rules/envs/hicdc.yaml +12 -0
  36. snakehichiptf-0.1.1/snakehichiptf/rules/envs/hicexplorer.yaml +7 -0
  37. snakehichiptf-0.1.1/snakehichiptf/rules/envs/hichipper.yaml +9 -0
  38. snakehichiptf-0.1.1/snakehichiptf/rules/envs/hicpro.yaml +23 -0
  39. snakehichiptf-0.1.1/snakehichiptf/rules/envs/maps.yaml +12 -0
  40. snakehichiptf-0.1.1/snakehichiptf/rules/envs/mapsrun.yaml +7 -0
  41. snakehichiptf-0.1.1/snakehichiptf/rules/envs/r.yaml +17 -0
  42. snakehichiptf-0.1.1/snakehichiptf/rules/envs/samtools.yaml +7 -0
  43. snakehichiptf-0.1.1/snakehichiptf/rules/envs/scprinter_gpu.yaml +48 -0
  44. snakehichiptf-0.1.1/snakehichiptf/rules/envs/tobias.yaml +14 -0
  45. snakehichiptf-0.1.1/snakehichiptf/scripts/MAPS.py +299 -0
  46. snakehichiptf-0.1.1/snakehichiptf/scripts/MAPS_peak_formatting.r +103 -0
  47. snakehichiptf-0.1.1/snakehichiptf/scripts/MAPS_regression_and_peak_caller.r +398 -0
  48. snakehichiptf-0.1.1/snakehichiptf/scripts/chr2_scprinter_main.py +493 -0
  49. snakehichiptf-0.1.1/snakehichiptf/scripts/feather_filter_all.py +60 -0
  50. snakehichiptf-0.1.1/snakehichiptf/scripts/feather_filter_chr.py +342 -0
  51. snakehichiptf-0.1.1/snakehichiptf/scripts/feather_filter_chr_hicpro.py +115 -0
  52. snakehichiptf-0.1.1/snakehichiptf/scripts/feather_split_all.py +68 -0
  53. snakehichiptf-0.1.1/snakehichiptf/scripts/feather_split_rongxin.py +377 -0
  54. snakehichiptf-0.1.1/snakehichiptf/scripts/feature_frag2bin.py +68 -0
  55. snakehichiptf-0.1.1/snakehichiptf/scripts/fithichip/BiasCalc.r +93 -0
  56. snakehichiptf-0.1.1/snakehichiptf/scripts/fithichip/CombineNearbyInteraction.py +331 -0
  57. snakehichiptf-0.1.1/snakehichiptf/scripts/fithichip/CombineREFragMappGC.r +32 -0
  58. snakehichiptf-0.1.1/snakehichiptf/scripts/fithichip/ContactCountDistr.r +87 -0
  59. snakehichiptf-0.1.1/snakehichiptf/scripts/fithichip/ContactMatDiffRes.sh +153 -0
  60. snakehichiptf-0.1.1/snakehichiptf/scripts/fithichip/CoverageBin.py +220 -0
  61. snakehichiptf-0.1.1/snakehichiptf/scripts/fithichip/CoverageBin.r +129 -0
  62. snakehichiptf-0.1.1/snakehichiptf/scripts/fithichip/CreateBinMatrixFromBed.r +110 -0
  63. snakehichiptf-0.1.1/snakehichiptf/scripts/fithichip/DiffAnalysisHiChIP.r +1268 -0
  64. snakehichiptf-0.1.1/snakehichiptf/scripts/fithichip/Distance_vs_CC.r +74 -0
  65. snakehichiptf-0.1.1/snakehichiptf/scripts/fithichip/Extract_contactMat_HiC.py +80 -0
  66. snakehichiptf-0.1.1/snakehichiptf/scripts/fithichip/Filt_Loop_DistThr.r +38 -0
  67. snakehichiptf-0.1.1/snakehichiptf/scripts/fithichip/FitHiC_SigInt.r +1917 -0
  68. snakehichiptf-0.1.1/snakehichiptf/scripts/fithichip/HiC_Simulate_by_ChIP_Coverage.r +323 -0
  69. snakehichiptf-0.1.1/snakehichiptf/scripts/fithichip/Interaction.r +744 -0
  70. snakehichiptf-0.1.1/snakehichiptf/scripts/fithichip/InteractionHicPro.r +52 -0
  71. snakehichiptf-0.1.1/snakehichiptf/scripts/fithichip/InteractionPlots.r +460 -0
  72. snakehichiptf-0.1.1/snakehichiptf/scripts/fithichip/Interaction_Sort_Genomic_Distance.r +55 -0
  73. snakehichiptf-0.1.1/snakehichiptf/scripts/fithichip/MergeBAMInferPeak.sh +122 -0
  74. snakehichiptf-0.1.1/snakehichiptf/scripts/fithichip/PackageTest.r +20 -0
  75. snakehichiptf-0.1.1/snakehichiptf/scripts/fithichip/PeakInferHiChIP.sh +212 -0
  76. snakehichiptf-0.1.1/snakehichiptf/scripts/fithichip/PlotGenomeBins.r +207 -0
  77. snakehichiptf-0.1.1/snakehichiptf/scripts/fithichip/Process_contactMat_HiC.py +70 -0
  78. snakehichiptf-0.1.1/snakehichiptf/scripts/fithichip/Significance_Features.r +137 -0
  79. snakehichiptf-0.1.1/snakehichiptf/scripts/fithichip/SummaryFitHiChIP.sh +216 -0
  80. snakehichiptf-0.1.1/snakehichiptf/scripts/fithichip/result_summary.r +130 -0
  81. snakehichiptf-0.1.1/snakehichiptf/scripts/fithichip/scripts/hichip_peak_call_script.sh +27 -0
  82. snakehichiptf-0.1.1/snakehichiptf/scripts/fithichip/scripts/sample_script.sh +46 -0
  83. snakehichiptf-0.1.1/snakehichiptf/scripts/generate_site_positions_yq.py +36 -0
  84. snakehichiptf-0.1.1/snakehichiptf/scripts/hicdc_differential_interactions.R +130 -0
  85. snakehichiptf-0.1.1/snakehichiptf/scripts/hicdc_genomefeature.R +390 -0
  86. snakehichiptf-0.1.1/snakehichiptf/scripts/hicdc_significant_interactions.R +248 -0
  87. snakehichiptf-0.1.1/snakehichiptf/scripts/hicdc_significant_interactions_bak.R +234 -0
  88. snakehichiptf-0.1.1/snakehichiptf/scripts/hichipper.diffloop_differential_analysis.R +91 -0
  89. snakehichiptf-0.1.1/snakehichiptf/scripts/hichipper.diffloop_work.R +30 -0
  90. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/Makefile +81 -0
  91. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/bin/HiC-Pro +347 -0
  92. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/bin/utils/digest_genome.py +195 -0
  93. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/bin/utils/extract_snps.py +343 -0
  94. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/bin/utils/hicpro2fithic.py +119 -0
  95. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/bin/utils/hicpro2higlass.sh +276 -0
  96. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/bin/utils/hicpro2juicebox.sh +158 -0
  97. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/bin/utils/make_viewpoints.py +317 -0
  98. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/bin/utils/sparseToDense.py +171 -0
  99. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/bin/utils/split_reads.py +47 -0
  100. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/bin/utils/split_sparse.py +97 -0
  101. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/config-system.txt +11 -0
  102. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/scripts/Makefile +195 -0
  103. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/scripts/bowtie_combine.sh +89 -0
  104. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/scripts/bowtie_pairing.sh +113 -0
  105. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/scripts/bowtie_wrap.sh +195 -0
  106. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/scripts/build_matrix +0 -0
  107. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/scripts/build_raw_maps.sh +110 -0
  108. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/scripts/cutsite_trimming +0 -0
  109. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/scripts/hic.inc.sh +328 -0
  110. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/scripts/ice +127 -0
  111. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/scripts/ice_norm.sh +100 -0
  112. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/scripts/make_lsf_script.sh +136 -0
  113. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/scripts/make_plots.sh +127 -0
  114. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/scripts/make_sge_script.sh +134 -0
  115. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/scripts/make_slurm_script.sh +139 -0
  116. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/scripts/make_torque_script.sh +135 -0
  117. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/scripts/mapped_2hic_dnase.py +455 -0
  118. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/scripts/mapped_2hic_fragments.py +828 -0
  119. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/scripts/mapped_2hic_fragments.sh +81 -0
  120. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/scripts/mapping_stat.sh +94 -0
  121. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/scripts/markAllelicStatus.py +431 -0
  122. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/scripts/mergeSAM.py +309 -0
  123. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/scripts/merge_statfiles.py +130 -0
  124. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/scripts/merge_stats.sh +82 -0
  125. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/scripts/merge_valid_interactions.sh +122 -0
  126. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/scripts/onTarget.py +174 -0
  127. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/scripts/plot_hic_contacts.R +146 -0
  128. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/scripts/plot_hic_fragment.R +136 -0
  129. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/scripts/plot_mapping_portion.R +160 -0
  130. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/scripts/plot_pairing_portion.R +142 -0
  131. snakehichiptf-0.1.1/snakehichiptf/scripts/hicpro-3.1.0/scripts/split_valid_interactions.py +201 -0
  132. snakehichiptf-0.1.1/snakehichiptf/scripts/logger.py +16 -0
  133. snakehichiptf-0.1.1/snakehichiptf/scripts/make_maps_runfile.py +53 -0
  134. snakehichiptf-0.1.1/snakehichiptf/scripts/merge_map.py +37 -0
  135. snakehichiptf-0.1.1/snakehichiptf/scripts/overlaps_gr1.tsv +21752 -0
  136. snakehichiptf-0.1.1/snakehichiptf/scripts/overlaps_gr2.tsv +47739 -0
  137. snakehichiptf-0.1.1/snakehichiptf/scripts/plot_footprints_scprinter_standalone.py +96 -0
  138. snakehichiptf-0.1.1/snakehichiptf/scripts/qcReport_make.Rmd +218 -0
  139. snakehichiptf-0.1.1/snakehichiptf/scripts/qc_all.R +147 -0
  140. snakehichiptf-0.1.1/snakehichiptf/scripts/qc_hichip_barplot.R +108 -0
  141. snakehichiptf-0.1.1/snakehichiptf/scripts/qc_hichip_quantiles.py +70 -0
  142. snakehichiptf-0.1.1/snakehichiptf/scripts/qc_plot_quantiles.R +252 -0
  143. snakehichiptf-0.1.1/snakehichiptf/scripts/restriction_cut_multipleenzyme.py +125 -0
  144. snakehichiptf-0.1.1/snakehichiptf/scripts/scprinter_main.py +555 -0
  145. snakehichiptf-0.1.1/snakehichiptf/scripts/singlecell_scprinter_main.py +1038 -0
  146. snakehichiptf-0.1.1/snakehichiptf/ui/__init__.py +0 -0
  147. snakehichiptf-0.1.1/snakehichiptf/ui/launch.py +17 -0
  148. snakehichiptf-0.1.1/snakehichiptf/ui/stl_app.py +260 -0
  149. snakehichiptf-0.1.1/snakehichiptf/workflows/Diffhichip.py +163 -0
  150. snakehichiptf-0.1.1/snakehichiptf/workflows/Genomesetup.py +97 -0
  151. snakehichiptf-0.1.1/snakehichiptf/workflows/Snakehichip.py +197 -0
  152. snakehichiptf-0.1.1/snakehichiptf/workflows/TFscprinter.py +179 -0
  153. snakehichiptf-0.1.1/snakehichiptf/workflows/TFtobias.py +133 -0
  154. snakehichiptf-0.1.1/snakehichiptf/workflows/__init__.py +5 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Yidan Sun
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,5 @@
1
+ recursive-include snakehichiptf/data *
2
+ recursive-include snakehichiptf/docs *
3
+ recursive-include snakehichiptf/scripts *
4
+ recursive-include snakehichiptf/rules *
5
+ recursive-include snakehichiptf/rules/envs *
@@ -0,0 +1,322 @@
1
+ Metadata-Version: 2.4
2
+ Name: SnakeHichipTF
3
+ Version: 0.1.1
4
+ Summary: A Snakemake pipeline for integrating HiChIP differential interaction analysis and TF binding analysis.
5
+ Home-page: https://github.com/YidanSunResearchLab/SnakeHichipTF
6
+ Author: Yidan Sun
7
+ Author-email: Yidan Sun <syidan@wustl.edu>
8
+ Project-URL: homepage, https://github.com/YidanSunResearchLab/snakehichiptf
9
+ Project-URL: repository, https://github.com/YidanSunResearchLab/snakehichiptf
10
+ Project-URL: issues, https://github.com/YidanSunResearchLab/snakehichiptf/issues
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Programming Language :: Python :: 3.8
13
+ Classifier: Operating System :: POSIX
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
16
+ Requires-Python: >=3.8
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ Requires-Dist: snakemake>=8.28.0
20
+ Dynamic: author
21
+ Dynamic: home-page
22
+ Dynamic: license-file
23
+ Dynamic: requires-python
24
+
25
+ # SnakeHichipTF
26
+
27
+ **A Comprehensive Snakemake Pipeline for integrating HiChIP / PLAC-Seq Processing and Transcription Factor Binding Analysis**
28
+
29
+ ---
30
+
31
+ ## Overview
32
+
33
+ **SnakeHichipTF** is a modular, reproducible, and scalable Snakemake-based workflow for integrative analysis of **HiChIP** and **PLAC-seq** datasets, with optional integration of **ATAC-seq–based transcription factor (TF) footprinting**.
34
+
35
+ ![Image](snakehichiptf/docs/overview.png)
36
+
37
+
38
+ The pipeline supports:
39
+
40
+ * End-to-end processing from FASTQ → interaction maps → loop calling → TF binding inference
41
+ * Multiple mapping engines: **HiC-Pro**, **Chromap**
42
+ * Multiple loop callers: **MAPS**, **FitHiChIP**, **HiChipper**, **HiCDCPlus**
43
+ * AI-based TF binding inference via **scPrinter**
44
+ * Footprinting-based TF analysis using **TOBIAS**
45
+ * Genome setup utilities (restriction fragments, indices)
46
+ * Read downsampling and QC reporting
47
+ * Fully reproducible execution via **Snakemake**
48
+
49
+ SnakeHichipTF is designed for flexible experimental designs, including bulk HiChIP, PLAC-seq, and integration with matched ATAC-seq data.
50
+
51
+ ---
52
+
53
+ ## Key Features
54
+
55
+ ### 1. Modular Architecture
56
+
57
+ Each analytical stage is implemented as an independent Snakemake rule:
58
+
59
+ * Genome preparation
60
+ * Significant interaction analysis
61
+ * Differential interaction analysis
62
+ * TF binding and footprint analysis
63
+
64
+ This allows selective execution and easy customization.
65
+
66
+ ---
67
+
68
+ ### 2. Multi-Algorithm Loop Calling for HiChIP/PLAC-seq
69
+
70
+ Supported loop callers:
71
+
72
+ * **MAPS**
73
+ * **FitHiChIP**
74
+ * **HiChipper**
75
+ * **HiCDCPlus**
76
+
77
+ Users can benchmark across algorithms within a single workflow.
78
+
79
+ ---
80
+
81
+ ### 3. AI-Based TF Binding Inference (scPrinter)
82
+
83
+ SnakeHichipTF integrates **scPrinter**, enabling:
84
+
85
+ * seq2PRINT model training
86
+ * TF binding signal inference
87
+ * Motif scanning and TFBS scoring
88
+ * Comparative TF activity visualization
89
+
90
+ ---
91
+
92
+ ### 4. ATAC-Seq Footprinting (TOBIAS)
93
+
94
+ For chromatin accessibility-based TF analysis:
95
+
96
+ * Bias correction
97
+ * Footprint detection
98
+ * Motif enrichment
99
+ * TF activity scoring
100
+
101
+ ---
102
+
103
+ ### 5. Reproducibility and Scalability
104
+
105
+ * Snakemake-managed dependency control
106
+ * Conda environment integration
107
+ * HPC cluster compatibility
108
+ * Parallelized execution
109
+ * Resume capability
110
+
111
+ ---
112
+
113
+ # Installation
114
+
115
+ ## 1. Clone Repository
116
+
117
+ ```bash
118
+ git clone https://github.com/YidanSunResearchLab/SnakeHichipTF.git
119
+ cd SnakeHichipTF
120
+ ```
121
+
122
+ ## 2. Create Environment
123
+
124
+ ```bash
125
+ conda create -n SnakeHichipTF -c conda-forge python=3.13
126
+ conda activate SnakeHichipTF
127
+ pip install .
128
+ ```
129
+
130
+ (Advanced users may use a dedicated environment for GPU-enabled scPrinter workflows.)
131
+
132
+ ## 3. Verify Installation
133
+
134
+ ```bash
135
+ Snakehichip --help
136
+ ```
137
+
138
+ ---
139
+
140
+ ## 🖥️ Optional: Launch GUI
141
+
142
+ For a graphical interface:
143
+
144
+ ```bash
145
+ snakehichiptf-ui
146
+ ```
147
+
148
+ ---
149
+ # Quick Start Guide
150
+
151
+ SnakeHichipTF provides several high-level commands.
152
+
153
+ ---
154
+
155
+ ## 1️⃣ Genome Setup
156
+
157
+ Prepare genome indices and restriction fragments.
158
+
159
+ ```bash
160
+ Genomesetup \
161
+ --organism hg38 \
162
+ --organism_fasta /path/to/genome.fa \
163
+ -o ./genome \
164
+ --restriction_enzyme mboi \
165
+ --bin_size 5000 \
166
+ --threads 32
167
+ ```
168
+
169
+ ### Outputs:
170
+
171
+ * Indexed genome
172
+ * Restriction fragment BED
173
+ * Precomputed binning files
174
+
175
+ ---
176
+
177
+ ## 2️⃣ HiChIP / PLAC-Seq Processing
178
+
179
+ Process FASTQ files into interaction matrices and loop calls.
180
+
181
+ ```bash
182
+ Snakehichip \
183
+ -i /path/to/input_fastqs/ \
184
+ --genome_dir /path/to/genome \
185
+ -o /path/to/output_directory/ \
186
+ --organism hg38 \
187
+ --bin_size 5000 \
188
+ --threads 32 \
189
+ --downsample_size 50000000
190
+ ```
191
+
192
+ ### Steps Performed:
193
+
194
+ 1. Read alignment
195
+ 2. Filtering & deduplication
196
+ 3. Contact matrix construction
197
+ 4. Loop calling (multiple algorithms)
198
+ 5. Quality control reporting
199
+
200
+ ---
201
+
202
+ ## 3️⃣ Differential HiChIP Analysis
203
+
204
+ ```bash
205
+ Diffhichip \
206
+ -s /path/to/sample_sheet.tsv \
207
+ -o /path/to/output_directory/ \
208
+ --threads 16 \
209
+ --bin_size 5000 \
210
+ --fitType mean \
211
+ --fdr 0.05
212
+ ```
213
+
214
+ ### Inputs:
215
+
216
+ * Sample sheet describing sample file paths and condition labels, examples are in the data/ folder
217
+
218
+ ### Outputs:
219
+
220
+ * Differential interaction results
221
+ * FDR-filtered loop sets
222
+
223
+ ---
224
+
225
+ ## 4️⃣ TF Binding Analysis via scPrinter
226
+
227
+ Run AI-based TF binding inference using ATAC-seq input and loop regions.
228
+
229
+ ```bash
230
+ TFscprinter \
231
+ -o /path/to/output_directory/ \
232
+ --organism hg38 \
233
+ --atacseq_bam "/path/to/sample.bam" \
234
+ --enhancer_bedpe "/path/to/significant_loops.bedpe" \
235
+ --samples "Sample1" \
236
+ --threads 32
237
+ ```
238
+
239
+ ### Outputs:
240
+
241
+ * seq2PRINT trained models
242
+ * TFBS bigWig tracks
243
+ * Motif scanning results
244
+ * TFBS score tables
245
+ * Scatter plot comparisons
246
+
247
+ ---
248
+
249
+ ## 5️⃣ ATAC-Seq Footprinting with TOBIAS
250
+
251
+ ```bash
252
+ TFtobias \
253
+ -o /path/to/output_directory/ \
254
+ --organism hg38 \
255
+ --atacseq_bam "/path/to/sample1.bam /path/to/sample2.bam" \
256
+ --enhancer_bedpe "/path/to/sample1.bedpe /path/to/sample2.bedpe" \
257
+ --samples "Sample1 Sample2" \
258
+ --threads 32 \
259
+ --motif "/path/to/JASPAR2024_CORE_non-redundant_pfms.meme"
260
+ ```
261
+
262
+ ### Outputs:
263
+
264
+ * Corrected bigWig tracks
265
+ * Footprint regions
266
+ * Motif enrichment reports
267
+ * TF activity scores
268
+
269
+ ---
270
+
271
+ # Directory Structure
272
+
273
+ ```
274
+ SnakeHichipTF/
275
+ │
276
+ ├── snakehichiptf/
277
+ │ ├── workflows/
278
+ │ ├── rules/
279
+ │ ├── scripts/
280
+ │ ├── docs/
281
+ │
282
+ └── setup.py
283
+ ```
284
+
285
+ ---
286
+
287
+ # Documentation
288
+
289
+ Detailed documentation for each module:
290
+
291
+ - [Genomesetup.py](snakehichiptf/docs/Genomesetup.md)
292
+ - [Snakehichip.py](snakehichiptf/docs/Snakehichip.md)
293
+ - [Diffhichip.py](snakehichiptf/docs/Diffhichip.md)
294
+ - [TFscprinter.py](snakehichiptf/docs/TFscprinter.md)
295
+ - [TFtobias.py](snakehichiptf/docs/TFtobias.md)
296
+
297
+ See the `docs/` directory for command-level explanations.
298
+
299
+ ---
300
+
301
+ # Recommended Usage Strategy
302
+
303
+ For large-scale projects:
304
+
305
+ 1. Perform genome setup once.
306
+ 2. Run Snakehichip for each sample.
307
+ 3. Aggregate and run Diffhichip if comparing conditions.
308
+ 4. Perform TFscprinter or TFtobias for mechanistic interpretation.
309
+
310
+ ---
311
+
312
+ # Contributing
313
+
314
+ Issues and pull requests are welcome:
315
+
316
+ [https://github.com/YidanSunResearchLab/SnakeHichipTF](https://github.com/YidanSunResearchLab/SnakeHichipTF)
317
+
318
+ ---
319
+
320
+ # License
321
+
322
+ See [LICENSE](LICENSE) for details.
@@ -0,0 +1,298 @@
1
+ # SnakeHichipTF
2
+
3
+ **A Comprehensive Snakemake Pipeline for integrating HiChIP / PLAC-Seq Processing and Transcription Factor Binding Analysis**
4
+
5
+ ---
6
+
7
+ ## Overview
8
+
9
+ **SnakeHichipTF** is a modular, reproducible, and scalable Snakemake-based workflow for integrative analysis of **HiChIP** and **PLAC-seq** datasets, with optional integration of **ATAC-seq–based transcription factor (TF) footprinting**.
10
+
11
+ ![Image](snakehichiptf/docs/overview.png)
12
+
13
+
14
+ The pipeline supports:
15
+
16
+ * End-to-end processing from FASTQ → interaction maps → loop calling → TF binding inference
17
+ * Multiple mapping engines: **HiC-Pro**, **Chromap**
18
+ * Multiple loop callers: **MAPS**, **FitHiChIP**, **HiChipper**, **HiCDCPlus**
19
+ * AI-based TF binding inference via **scPrinter**
20
+ * Footprinting-based TF analysis using **TOBIAS**
21
+ * Genome setup utilities (restriction fragments, indices)
22
+ * Read downsampling and QC reporting
23
+ * Fully reproducible execution via **Snakemake**
24
+
25
+ SnakeHichipTF is designed for flexible experimental designs, including bulk HiChIP, PLAC-seq, and integration with matched ATAC-seq data.
26
+
27
+ ---
28
+
29
+ ## Key Features
30
+
31
+ ### 1. Modular Architecture
32
+
33
+ Each analytical stage is implemented as an independent Snakemake rule:
34
+
35
+ * Genome preparation
36
+ * Significant interaction analysis
37
+ * Differential interaction analysis
38
+ * TF binding and footprint analysis
39
+
40
+ This allows selective execution and easy customization.
41
+
42
+ ---
43
+
44
+ ### 2. Multi-Algorithm Loop Calling for HiChIP/PLAC-seq
45
+
46
+ Supported loop callers:
47
+
48
+ * **MAPS**
49
+ * **FitHiChIP**
50
+ * **HiChipper**
51
+ * **HiCDCPlus**
52
+
53
+ Users can benchmark across algorithms within a single workflow.
54
+
55
+ ---
56
+
57
+ ### 3. AI-Based TF Binding Inference (scPrinter)
58
+
59
+ SnakeHichipTF integrates **scPrinter**, enabling:
60
+
61
+ * seq2PRINT model training
62
+ * TF binding signal inference
63
+ * Motif scanning and TFBS scoring
64
+ * Comparative TF activity visualization
65
+
66
+ ---
67
+
68
+ ### 4. ATAC-Seq Footprinting (TOBIAS)
69
+
70
+ For chromatin accessibility-based TF analysis:
71
+
72
+ * Bias correction
73
+ * Footprint detection
74
+ * Motif enrichment
75
+ * TF activity scoring
76
+
77
+ ---
78
+
79
+ ### 5. Reproducibility and Scalability
80
+
81
+ * Snakemake-managed dependency control
82
+ * Conda environment integration
83
+ * HPC cluster compatibility
84
+ * Parallelized execution
85
+ * Resume capability
86
+
87
+ ---
88
+
89
+ # Installation
90
+
91
+ ## 1. Clone Repository
92
+
93
+ ```bash
94
+ git clone https://github.com/YidanSunResearchLab/SnakeHichipTF.git
95
+ cd SnakeHichipTF
96
+ ```
97
+
98
+ ## 2. Create Environment
99
+
100
+ ```bash
101
+ conda create -n SnakeHichipTF -c conda-forge python=3.13
102
+ conda activate SnakeHichipTF
103
+ pip install .
104
+ ```
105
+
106
+ (Advanced users may use a dedicated environment for GPU-enabled scPrinter workflows.)
107
+
108
+ ## 3. Verify Installation
109
+
110
+ ```bash
111
+ Snakehichip --help
112
+ ```
113
+
114
+ ---
115
+
116
+ ## 🖥️ Optional: Launch GUI
117
+
118
+ For a graphical interface:
119
+
120
+ ```bash
121
+ snakehichiptf-ui
122
+ ```
123
+
124
+ ---
125
+ # Quick Start Guide
126
+
127
+ SnakeHichipTF provides several high-level commands.
128
+
129
+ ---
130
+
131
+ ## 1️⃣ Genome Setup
132
+
133
+ Prepare genome indices and restriction fragments.
134
+
135
+ ```bash
136
+ Genomesetup \
137
+ --organism hg38 \
138
+ --organism_fasta /path/to/genome.fa \
139
+ -o ./genome \
140
+ --restriction_enzyme mboi \
141
+ --bin_size 5000 \
142
+ --threads 32
143
+ ```
144
+
145
+ ### Outputs:
146
+
147
+ * Indexed genome
148
+ * Restriction fragment BED
149
+ * Precomputed binning files
150
+
151
+ ---
152
+
153
+ ## 2️⃣ HiChIP / PLAC-Seq Processing
154
+
155
+ Process FASTQ files into interaction matrices and loop calls.
156
+
157
+ ```bash
158
+ Snakehichip \
159
+ -i /path/to/input_fastqs/ \
160
+ --genome_dir /path/to/genome \
161
+ -o /path/to/output_directory/ \
162
+ --organism hg38 \
163
+ --bin_size 5000 \
164
+ --threads 32 \
165
+ --downsample_size 50000000
166
+ ```
167
+
168
+ ### Steps Performed:
169
+
170
+ 1. Read alignment
171
+ 2. Filtering & deduplication
172
+ 3. Contact matrix construction
173
+ 4. Loop calling (multiple algorithms)
174
+ 5. Quality control reporting
175
+
176
+ ---
177
+
178
+ ## 3️⃣ Differential HiChIP Analysis
179
+
180
+ ```bash
181
+ Diffhichip \
182
+ -s /path/to/sample_sheet.tsv \
183
+ -o /path/to/output_directory/ \
184
+ --threads 16 \
185
+ --bin_size 5000 \
186
+ --fitType mean \
187
+ --fdr 0.05
188
+ ```
189
+
190
+ ### Inputs:
191
+
192
+ * Sample sheet describing sample file paths and condition labels, examples are in the data/ folder
193
+
194
+ ### Outputs:
195
+
196
+ * Differential interaction results
197
+ * FDR-filtered loop sets
198
+
199
+ ---
200
+
201
+ ## 4️⃣ TF Binding Analysis via scPrinter
202
+
203
+ Run AI-based TF binding inference using ATAC-seq input and loop regions.
204
+
205
+ ```bash
206
+ TFscprinter \
207
+ -o /path/to/output_directory/ \
208
+ --organism hg38 \
209
+ --atacseq_bam "/path/to/sample.bam" \
210
+ --enhancer_bedpe "/path/to/significant_loops.bedpe" \
211
+ --samples "Sample1" \
212
+ --threads 32
213
+ ```
214
+
215
+ ### Outputs:
216
+
217
+ * seq2PRINT trained models
218
+ * TFBS bigWig tracks
219
+ * Motif scanning results
220
+ * TFBS score tables
221
+ * Scatter plot comparisons
222
+
223
+ ---
224
+
225
+ ## 5️⃣ ATAC-Seq Footprinting with TOBIAS
226
+
227
+ ```bash
228
+ TFtobias \
229
+ -o /path/to/output_directory/ \
230
+ --organism hg38 \
231
+ --atacseq_bam "/path/to/sample1.bam /path/to/sample2.bam" \
232
+ --enhancer_bedpe "/path/to/sample1.bedpe /path/to/sample2.bedpe" \
233
+ --samples "Sample1 Sample2" \
234
+ --threads 32 \
235
+ --motif "/path/to/JASPAR2024_CORE_non-redundant_pfms.meme"
236
+ ```
237
+
238
+ ### Outputs:
239
+
240
+ * Corrected bigWig tracks
241
+ * Footprint regions
242
+ * Motif enrichment reports
243
+ * TF activity scores
244
+
245
+ ---
246
+
247
+ # Directory Structure
248
+
249
+ ```
250
+ SnakeHichipTF/
251
+ │
252
+ ├── snakehichiptf/
253
+ │ ├── workflows/
254
+ │ ├── rules/
255
+ │ ├── scripts/
256
+ │ ├── docs/
257
+ │
258
+ └── setup.py
259
+ ```
260
+
261
+ ---
262
+
263
+ # Documentation
264
+
265
+ Detailed documentation for each module:
266
+
267
+ - [Genomesetup.py](snakehichiptf/docs/Genomesetup.md)
268
+ - [Snakehichip.py](snakehichiptf/docs/Snakehichip.md)
269
+ - [Diffhichip.py](snakehichiptf/docs/Diffhichip.md)
270
+ - [TFscprinter.py](snakehichiptf/docs/TFscprinter.md)
271
+ - [TFtobias.py](snakehichiptf/docs/TFtobias.md)
272
+
273
+ See the `docs/` directory for command-level explanations.
274
+
275
+ ---
276
+
277
+ # Recommended Usage Strategy
278
+
279
+ For large-scale projects:
280
+
281
+ 1. Perform genome setup once.
282
+ 2. Run Snakehichip for each sample.
283
+ 3. Aggregate and run Diffhichip if comparing conditions.
284
+ 4. Perform TFscprinter or TFtobias for mechanistic interpretation.
285
+
286
+ ---
287
+
288
+ # Contributing
289
+
290
+ Issues and pull requests are welcome:
291
+
292
+ [https://github.com/YidanSunResearchLab/SnakeHichipTF](https://github.com/YidanSunResearchLab/SnakeHichipTF)
293
+
294
+ ---
295
+
296
+ # License
297
+
298
+ See [LICENSE](LICENSE) for details.