offtracker 2.7.7__zip → 2.7.10__zip

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 (33) hide show
  1. offtracker-2.7.10/PKG-INFO +189 -0
  2. offtracker-2.7.10/README.md +177 -0
  3. offtracker-2.7.10/offtracker/X_offplot.py +539 -0
  4. {offtracker-2.7.7 → offtracker-2.7.10}/offtracker/X_offtracker.py +2 -1
  5. offtracker-2.7.10/offtracker/_version.py +30 -0
  6. offtracker-2.7.10/offtracker.egg-info/PKG-INFO +189 -0
  7. {offtracker-2.7.7 → offtracker-2.7.10}/offtracker.egg-info/SOURCES.txt +2 -1
  8. {offtracker-2.7.7 → offtracker-2.7.10}/scripts/offtracker_analysis.py +18 -9
  9. offtracker-2.7.10/scripts/offtracker_plot.py +39 -0
  10. {offtracker-2.7.7 → offtracker-2.7.10}/setup.py +5 -2
  11. offtracker-2.7.7/PKG-INFO +0 -146
  12. offtracker-2.7.7/README.md +0 -134
  13. offtracker-2.7.7/offtracker/X_offplot.py +0 -123
  14. offtracker-2.7.7/offtracker/_version.py +0 -27
  15. offtracker-2.7.7/offtracker.egg-info/PKG-INFO +0 -146
  16. {offtracker-2.7.7 → offtracker-2.7.10}/LICENSE.txt +0 -0
  17. {offtracker-2.7.7 → offtracker-2.7.10}/MANIFEST.in +0 -0
  18. {offtracker-2.7.7 → offtracker-2.7.10}/offtracker/X_sequence.py +0 -0
  19. {offtracker-2.7.7 → offtracker-2.7.10}/offtracker/__init__.py +0 -0
  20. {offtracker-2.7.7 → offtracker-2.7.10}/offtracker/mapping/1.1_bed2fr_v4.5.py +0 -0
  21. {offtracker-2.7.7 → offtracker-2.7.10}/offtracker/mapping/1.3_bdg_normalize_v4.0.py +0 -0
  22. {offtracker-2.7.7 → offtracker-2.7.10}/offtracker/mapping/Snakefile_offtracker +0 -0
  23. {offtracker-2.7.7 → offtracker-2.7.10}/offtracker/mapping/bedGraphToBigWig +0 -0
  24. {offtracker-2.7.7 → offtracker-2.7.10}/offtracker/mapping/hg38.chrom.sizes +0 -0
  25. {offtracker-2.7.7 → offtracker-2.7.10}/offtracker/mapping/mm10.chrom.sizes +0 -0
  26. {offtracker-2.7.7 → offtracker-2.7.10}/offtracker/mapping/offtracker_blacklist_hg38.merged.bed +0 -0
  27. {offtracker-2.7.7 → offtracker-2.7.10}/offtracker/mapping/offtracker_blacklist_mm10.merged.bed +0 -0
  28. {offtracker-2.7.7 → offtracker-2.7.10}/offtracker.egg-info/dependency_links.txt +0 -0
  29. {offtracker-2.7.7 → offtracker-2.7.10}/offtracker.egg-info/requires.txt +0 -0
  30. {offtracker-2.7.7 → offtracker-2.7.10}/offtracker.egg-info/top_level.txt +0 -0
  31. {offtracker-2.7.7 → offtracker-2.7.10}/scripts/offtracker_candidates.py +0 -0
  32. {offtracker-2.7.7 → offtracker-2.7.10}/scripts/offtracker_config.py +0 -0
  33. {offtracker-2.7.7 → offtracker-2.7.10}/setup.cfg +0 -0
@@ -0,0 +1,189 @@
1
+ Metadata-Version: 2.1
2
+ Name: offtracker
3
+ Version: 2.7.10
4
+ Summary: Tracking-seq data analysis
5
+ Home-page: https://github.com/Lan-lab/offtracker
6
+ Author: Runda Xu
7
+ Author-email: runda.xu@foxmail.com
8
+ Requires-Python: >=3.6.0
9
+ Description-Content-Type: text/markdown
10
+ License-File: LICENSE.txt
11
+
12
+
13
+ # OFF-TRACKER
14
+
15
+ OFF-TRACKER is an end to end pipeline of Tracking-seq data analysis for detecting off-target sites of any genome editing tools that generate double-strand breaks (DSBs) or single-strand breaks (SSBs).
16
+
17
+ ## System requirements
18
+
19
+ * Linux/Unix
20
+ * Python >= 3.6
21
+
22
+ ## Dependency
23
+
24
+ ```bash
25
+ # We recommend creating a new enviroment using mamba/conda to avoid compatibility problems
26
+ # If you don't use mamba, just replace the code with conda
27
+ mamba create -n offtracker -c bioconda blast snakemake pybedtools
28
+ ```
29
+
30
+
31
+ ## Installation
32
+
33
+ ```bash
34
+ # Activate the environment
35
+ conda activate offtracker
36
+
37
+ # Direct installation with pip
38
+ pip install offtracker
39
+
40
+ # (Alternative) Download the offtracker from github
41
+ git clone https://github.com/Lan-lab/offtracker.git
42
+ cd offtracker
43
+ pip install .
44
+ ```
45
+
46
+
47
+ ## Before analyzing samples
48
+
49
+ ```bash
50
+ # Build blast index (only need once for each genome)
51
+ makeblastdb -input_type fasta -title hg38 -dbtype nucl -parse_seqids \
52
+ -in /Your_Path_To_Reference/hg38_genome.fa \
53
+ -out /Your_Path_To_Reference/hg38_genome.blastdb \
54
+ -logfile /Your_Path_To_Reference/hg38_genome.blastdb.log
55
+
56
+ # Build chromap index (only need once for each genome)
57
+ chromap -i -r /Your_Path_To_Reference/hg38_genome.fa \
58
+ -o /Your_Path_To_Reference/hg38_genome.chromap.index
59
+
60
+ # Generate candidate regions by sgRNA sequence (need once for each genome and sgRNA)
61
+ # --name: the name of the sgRNA, which will be used in the following analysis
62
+ offtracker_candidates.py -t 8 -g hg38 \
63
+ -r /Your_Path_To_Reference/hg38_genome.fa \
64
+ -b /Your_Path_To_Reference/hg38_genome.blastdb \
65
+ --name 'VEGFA2' --sgrna 'GACCCCCTCCACCCCGCCTC' --pam 'NGG' \
66
+ -o /Your_Path_To_Candidates
67
+
68
+ ```
69
+
70
+ ## Strand-specific mapping of Tracking-seq data
71
+
72
+ ```bash
73
+ # Generate snakemake config file
74
+ # --subfolder: If different samples are in seperate folders, set this to 1
75
+ # if -o is not set, the output will be in the same folder as the fastq files
76
+ offtracker_config.py -t 8 -g hg38 --blacklist hg38 \
77
+ -r /Your_Path_To_Reference/hg38_genome.fa \
78
+ -i /Your_Path_To_Reference/hg38_genome.chromap.index \
79
+ -f /Your_Path_To_Fastq \
80
+ -o /Your_Path_To_Output \
81
+ --subfolder 0
82
+
83
+ # Run the snakemake program
84
+ cd /Your_Path_To_Fastq
85
+ snakemake -np # dry run
86
+ nohup snakemake --cores 16 1>snakemake.log 2>snakemake.err &
87
+
88
+ ## about cores
89
+ # --cores of snakemake must be larger than -t of offtracker_config.py
90
+ # parallel number = cores/t
91
+
92
+ ## about output
93
+ # This part will generate "*.fw.scaled.bw" and ".rv.scaled.bw" for IGV visualization
94
+ # "*.fw.bed" and "*.rv.bed" are used in the next part.
95
+ ```
96
+
97
+
98
+ ## Analyzing the genome-wide off-target sites
99
+
100
+ ```bash
101
+ # In this part, multiple samples in the same condition can be analyzed in a single run by pattern recogonization of sample names
102
+
103
+ offtracker_analysis.py -g hg38 --name "VEGFA2" \
104
+ --exp 'Cas9_VEGFA2' \
105
+ --control 'WT' \
106
+ --outname 'Cas9_VEGFA_293' \
107
+ -f /Your_Path_To_Output \
108
+ --seqfolder /Your_Path_To_Candidates
109
+
110
+ # --name: the same gRNA name you set when running offtracker_candidates.py
111
+ # --exp/--control: add one or multiple patterns of file name in regular expressions
112
+ # If multiple samples meet the pattern, their signals will be averaged. Thus, only samples with the same condition should be included in a single analysis.
113
+
114
+ # This step will generate Offtracker_result_{outname}.csv
115
+ # Default FDR is 0.05, which can be changed by --fdr. This will empirically make the threshold of Track score around 2.
116
+ # Sites with Track score >=2, which is a empirical threshold, are output regardless of FDR.
117
+ # Intermediate files are saved in ./temp folder, which can be deleted.
118
+ # Keeping the intermediate files can make the analysis faster if involving previously analyzed samples (e.g. using the same control samples for different analyses)
119
+ ```
120
+
121
+ ## Off-target sequences visualization
122
+
123
+ ```bash
124
+ # After get the Offtracker_result_{outname}.csv, you can visualize the off-target sites with their genomic sequence with the following command:
125
+
126
+ offtracker_plot.py --result Your_Offtracker_Result_CSV \
127
+ --sgrna 'GACCCCCTCCACCCCGCCTC' --pam 'NGG'
128
+
129
+ # The default output is a pdf file with Offtracker_result_{outname}.pdf
130
+ # Change the suffix of the output file to change the format (e.g.: .png)
131
+ # The orange dash line indicates the empirical threshold of Track score = 2
132
+ # Empirically, the off-target sites with Track score < 2 are less likely to be real off-target sites.
133
+ ```
134
+
135
+
136
+ ## Note1
137
+
138
+ The default setting only includes chr1-chr22, chrX, chrY, and chrM. Please make sure the reference genome contains "chr" at the beginning.
139
+
140
+ Currently, this software is only ready-to-use for mm10 and hg38. For any other genome, e.g., hg19, please add genome size file named "hg19.chrom.sizes" to .\offtracker\mapping and instal manually. Besides, add "--blacklist none" or "--blacklist Your_Blacklist" (e.g., ENCODE blacklist) when running offtracker_config.py, because we only provide blacklists for mm10 and hg38.
141
+
142
+ If you have a requirement for species other than human/mouse, please post an issue.
143
+
144
+ ## Note2
145
+
146
+ The FDRs in the Tracking-seq result do not reflect the real off-target probability.
147
+ It is strongly recommended to observe the "fw.scaled.bw" and "rv.scaled.bw" using genome browser like IGV to visually inspect each target location from the Tracking-seq result.
148
+
149
+
150
+
151
+ # Example Data
152
+
153
+ Here are example data that contains reads of chr6 from HEK293T cells edited with Cas9 + sgRNA VEGFA2 and wild type cells:
154
+
155
+ https://figshare.com/articles/dataset/WT_HEK239T_chr6/25956034
156
+
157
+ It takes about 5-10 minutes to run the mapping (offtracker_config.py & snakemake) of example data with -t 8 and --cores 16 (2 parallel tasks)
158
+
159
+ ## Signal visualization
160
+
161
+ After mapping, there will be 4 .bw files in the output folder:
162
+ ```bash
163
+ Cas9_VEGFA2_chr6.fw.scaled.bw
164
+
165
+ Cas9_VEGFA2_chr6.rv.scaled.bw
166
+
167
+ WT_chr6.fw.scaled.bw
168
+
169
+ WT_chr6.rv.scaled.bw
170
+ ```
171
+ These files can be visualized in genome browser like IGV:
172
+
173
+ ![signal](https://github.com/Lan-lab/offtracker/blob/main/example_output/signals_example.png?raw=true)
174
+
175
+
176
+ ## Whole genome off-target analysis
177
+
178
+ For analyzing the signals (offtracker_analysis.py), it takes about 3-5 minutes and outputs a file named "Offtracker_result_{outname}.csv"
179
+
180
+ After that, you can visualize the off-target sites with their genomic sequence (offtracker_plot.py) and get an image like this:
181
+
182
+ ![offtarget](https://github.com/Lan-lab/offtracker/blob/main/example_output/sequences_example.png?raw=true)
183
+
184
+ # Citation
185
+
186
+
187
+
188
+
189
+
@@ -0,0 +1,177 @@
1
+ # OFF-TRACKER
2
+
3
+ OFF-TRACKER is an end to end pipeline of Tracking-seq data analysis for detecting off-target sites of any genome editing tools that generate double-strand breaks (DSBs) or single-strand breaks (SSBs).
4
+
5
+ ## System requirements
6
+
7
+ * Linux/Unix
8
+ * Python >= 3.6
9
+
10
+ ## Dependency
11
+
12
+ ```bash
13
+ # We recommend creating a new enviroment using mamba/conda to avoid compatibility problems
14
+ # If you don't use mamba, just replace the code with conda
15
+ mamba create -n offtracker -c bioconda blast snakemake pybedtools
16
+ ```
17
+
18
+
19
+ ## Installation
20
+
21
+ ```bash
22
+ # Activate the environment
23
+ conda activate offtracker
24
+
25
+ # Direct installation with pip
26
+ pip install offtracker
27
+
28
+ # (Alternative) Download the offtracker from github
29
+ git clone https://github.com/Lan-lab/offtracker.git
30
+ cd offtracker
31
+ pip install .
32
+ ```
33
+
34
+
35
+ ## Before analyzing samples
36
+
37
+ ```bash
38
+ # Build blast index (only need once for each genome)
39
+ makeblastdb -input_type fasta -title hg38 -dbtype nucl -parse_seqids \
40
+ -in /Your_Path_To_Reference/hg38_genome.fa \
41
+ -out /Your_Path_To_Reference/hg38_genome.blastdb \
42
+ -logfile /Your_Path_To_Reference/hg38_genome.blastdb.log
43
+
44
+ # Build chromap index (only need once for each genome)
45
+ chromap -i -r /Your_Path_To_Reference/hg38_genome.fa \
46
+ -o /Your_Path_To_Reference/hg38_genome.chromap.index
47
+
48
+ # Generate candidate regions by sgRNA sequence (need once for each genome and sgRNA)
49
+ # --name: the name of the sgRNA, which will be used in the following analysis
50
+ offtracker_candidates.py -t 8 -g hg38 \
51
+ -r /Your_Path_To_Reference/hg38_genome.fa \
52
+ -b /Your_Path_To_Reference/hg38_genome.blastdb \
53
+ --name 'VEGFA2' --sgrna 'GACCCCCTCCACCCCGCCTC' --pam 'NGG' \
54
+ -o /Your_Path_To_Candidates
55
+
56
+ ```
57
+
58
+ ## Strand-specific mapping of Tracking-seq data
59
+
60
+ ```bash
61
+ # Generate snakemake config file
62
+ # --subfolder: If different samples are in seperate folders, set this to 1
63
+ # if -o is not set, the output will be in the same folder as the fastq files
64
+ offtracker_config.py -t 8 -g hg38 --blacklist hg38 \
65
+ -r /Your_Path_To_Reference/hg38_genome.fa \
66
+ -i /Your_Path_To_Reference/hg38_genome.chromap.index \
67
+ -f /Your_Path_To_Fastq \
68
+ -o /Your_Path_To_Output \
69
+ --subfolder 0
70
+
71
+ # Run the snakemake program
72
+ cd /Your_Path_To_Fastq
73
+ snakemake -np # dry run
74
+ nohup snakemake --cores 16 1>snakemake.log 2>snakemake.err &
75
+
76
+ ## about cores
77
+ # --cores of snakemake must be larger than -t of offtracker_config.py
78
+ # parallel number = cores/t
79
+
80
+ ## about output
81
+ # This part will generate "*.fw.scaled.bw" and ".rv.scaled.bw" for IGV visualization
82
+ # "*.fw.bed" and "*.rv.bed" are used in the next part.
83
+ ```
84
+
85
+
86
+ ## Analyzing the genome-wide off-target sites
87
+
88
+ ```bash
89
+ # In this part, multiple samples in the same condition can be analyzed in a single run by pattern recogonization of sample names
90
+
91
+ offtracker_analysis.py -g hg38 --name "VEGFA2" \
92
+ --exp 'Cas9_VEGFA2' \
93
+ --control 'WT' \
94
+ --outname 'Cas9_VEGFA_293' \
95
+ -f /Your_Path_To_Output \
96
+ --seqfolder /Your_Path_To_Candidates
97
+
98
+ # --name: the same gRNA name you set when running offtracker_candidates.py
99
+ # --exp/--control: add one or multiple patterns of file name in regular expressions
100
+ # If multiple samples meet the pattern, their signals will be averaged. Thus, only samples with the same condition should be included in a single analysis.
101
+
102
+ # This step will generate Offtracker_result_{outname}.csv
103
+ # Default FDR is 0.05, which can be changed by --fdr. This will empirically make the threshold of Track score around 2.
104
+ # Sites with Track score >=2, which is a empirical threshold, are output regardless of FDR.
105
+ # Intermediate files are saved in ./temp folder, which can be deleted.
106
+ # Keeping the intermediate files can make the analysis faster if involving previously analyzed samples (e.g. using the same control samples for different analyses)
107
+ ```
108
+
109
+ ## Off-target sequences visualization
110
+
111
+ ```bash
112
+ # After get the Offtracker_result_{outname}.csv, you can visualize the off-target sites with their genomic sequence with the following command:
113
+
114
+ offtracker_plot.py --result Your_Offtracker_Result_CSV \
115
+ --sgrna 'GACCCCCTCCACCCCGCCTC' --pam 'NGG'
116
+
117
+ # The default output is a pdf file with Offtracker_result_{outname}.pdf
118
+ # Change the suffix of the output file to change the format (e.g.: .png)
119
+ # The orange dash line indicates the empirical threshold of Track score = 2
120
+ # Empirically, the off-target sites with Track score < 2 are less likely to be real off-target sites.
121
+ ```
122
+
123
+
124
+ ## Note1
125
+
126
+ The default setting only includes chr1-chr22, chrX, chrY, and chrM. Please make sure the reference genome contains "chr" at the beginning.
127
+
128
+ Currently, this software is only ready-to-use for mm10 and hg38. For any other genome, e.g., hg19, please add genome size file named "hg19.chrom.sizes" to .\offtracker\mapping and instal manually. Besides, add "--blacklist none" or "--blacklist Your_Blacklist" (e.g., ENCODE blacklist) when running offtracker_config.py, because we only provide blacklists for mm10 and hg38.
129
+
130
+ If you have a requirement for species other than human/mouse, please post an issue.
131
+
132
+ ## Note2
133
+
134
+ The FDRs in the Tracking-seq result do not reflect the real off-target probability.
135
+ It is strongly recommended to observe the "fw.scaled.bw" and "rv.scaled.bw" using genome browser like IGV to visually inspect each target location from the Tracking-seq result.
136
+
137
+
138
+
139
+ # Example Data
140
+
141
+ Here are example data that contains reads of chr6 from HEK293T cells edited with Cas9 + sgRNA VEGFA2 and wild type cells:
142
+
143
+ https://figshare.com/articles/dataset/WT_HEK239T_chr6/25956034
144
+
145
+ It takes about 5-10 minutes to run the mapping (offtracker_config.py & snakemake) of example data with -t 8 and --cores 16 (2 parallel tasks)
146
+
147
+ ## Signal visualization
148
+
149
+ After mapping, there will be 4 .bw files in the output folder:
150
+ ```bash
151
+ Cas9_VEGFA2_chr6.fw.scaled.bw
152
+
153
+ Cas9_VEGFA2_chr6.rv.scaled.bw
154
+
155
+ WT_chr6.fw.scaled.bw
156
+
157
+ WT_chr6.rv.scaled.bw
158
+ ```
159
+ These files can be visualized in genome browser like IGV:
160
+
161
+ ![signal](https://github.com/Lan-lab/offtracker/blob/main/example_output/signals_example.png?raw=true)
162
+
163
+
164
+ ## Whole genome off-target analysis
165
+
166
+ For analyzing the signals (offtracker_analysis.py), it takes about 3-5 minutes and outputs a file named "Offtracker_result_{outname}.csv"
167
+
168
+ After that, you can visualize the off-target sites with their genomic sequence (offtracker_plot.py) and get an image like this:
169
+
170
+ ![offtarget](https://github.com/Lan-lab/offtracker/blob/main/example_output/sequences_example.png?raw=true)
171
+
172
+ # Citation
173
+
174
+
175
+
176
+
177
+