offtracker 2.11.3__zip → 2.11.5__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 (31) hide show
  1. {offtracker-2.11.3/offtracker.egg-info → offtracker-2.11.5}/PKG-INFO +1 -1
  2. {offtracker-2.11.3 → offtracker-2.11.5}/offtracker/_version.py +3 -2
  3. {offtracker-2.11.3 → offtracker-2.11.5/offtracker.egg-info}/PKG-INFO +1 -1
  4. {offtracker-2.11.3 → offtracker-2.11.5}/scripts/offtracker_analysis.py +30 -27
  5. {offtracker-2.11.3 → offtracker-2.11.5}/scripts/offtracker_candidates.py +3 -9
  6. {offtracker-2.11.3 → offtracker-2.11.5}/LICENSE.txt +0 -0
  7. {offtracker-2.11.3 → offtracker-2.11.5}/MANIFEST.in +0 -0
  8. {offtracker-2.11.3 → offtracker-2.11.5}/README.md +0 -0
  9. {offtracker-2.11.3 → offtracker-2.11.5}/offtracker/X_offplot.py +0 -0
  10. {offtracker-2.11.3 → offtracker-2.11.5}/offtracker/X_offtracker.py +0 -0
  11. {offtracker-2.11.3 → offtracker-2.11.5}/offtracker/X_sequence.py +0 -0
  12. {offtracker-2.11.3 → offtracker-2.11.5}/offtracker/__init__.py +0 -0
  13. {offtracker-2.11.3 → offtracker-2.11.5}/offtracker/snakefile/Snakefile_QC.smk +0 -0
  14. {offtracker-2.11.3 → offtracker-2.11.5}/offtracker/snakefile/Snakefile_offtracker.smk +0 -0
  15. {offtracker-2.11.3 → offtracker-2.11.5}/offtracker/utility/1.1_bed2fr.py +0 -0
  16. {offtracker-2.11.3 → offtracker-2.11.5}/offtracker/utility/1.3_bdg_normalize_v4.0.py +0 -0
  17. {offtracker-2.11.3 → offtracker-2.11.5}/offtracker/utility/bedGraphToBigWig +0 -0
  18. {offtracker-2.11.3 → offtracker-2.11.5}/offtracker/utility/hg38.chrom.sizes +0 -0
  19. {offtracker-2.11.3 → offtracker-2.11.5}/offtracker/utility/mm10.chrom.sizes +0 -0
  20. {offtracker-2.11.3 → offtracker-2.11.5}/offtracker/utility/offtracker_blacklist_hg38.merged.bed +0 -0
  21. {offtracker-2.11.3 → offtracker-2.11.5}/offtracker/utility/offtracker_blacklist_mm10.merged.bed +0 -0
  22. {offtracker-2.11.3 → offtracker-2.11.5}/offtracker.egg-info/SOURCES.txt +0 -0
  23. {offtracker-2.11.3 → offtracker-2.11.5}/offtracker.egg-info/dependency_links.txt +0 -0
  24. {offtracker-2.11.3 → offtracker-2.11.5}/offtracker.egg-info/requires.txt +0 -0
  25. {offtracker-2.11.3 → offtracker-2.11.5}/offtracker.egg-info/top_level.txt +0 -0
  26. {offtracker-2.11.3 → offtracker-2.11.5}/scripts/offtracker_config.py +0 -0
  27. {offtracker-2.11.3 → offtracker-2.11.5}/scripts/offtracker_init.py +0 -0
  28. {offtracker-2.11.3 → offtracker-2.11.5}/scripts/offtracker_plot.py +0 -0
  29. {offtracker-2.11.3 → offtracker-2.11.5}/scripts/offtracker_qc.py +0 -0
  30. {offtracker-2.11.3 → offtracker-2.11.5}/setup.cfg +0 -0
  31. {offtracker-2.11.3 → offtracker-2.11.5}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: offtracker
3
- Version: 2.11.3
3
+ Version: 2.11.5
4
4
  Summary: Tracking-seq data analysis
5
5
  Home-page: https://github.com/Lan-lab/offtracker
6
6
  Author: Runda Xu
@@ -1,4 +1,4 @@
1
- __version__ = "2.11.3"
1
+ __version__ = "2.11.5"
2
2
  # 2023.08.11. v1.1.0 adding a option for not normalizing the bw file
3
3
  # 2023.10.26. v1.9.0 prerelease for v2.0
4
4
  # 2023.10.27. v2.0.0 大更新,还没微调
@@ -38,4 +38,5 @@ __version__ = "2.11.3"
38
38
  # 2025.06.28. v2.10.9 现在 pip 都是从 wheel 安装,不再运行 setup.py,所以增加一个 offtracker_init.py
39
39
  # 2025.06.28. v2.10.10 直接塞 script 里试试
40
40
  # 2025.06.28. v2.10.11 回滚到2.10.9外加修正
41
- # 2025.07.02. v2.11.3 基于 blast 的缺陷更新 candidates
41
+ # 2025.07.02. v2.11.4 基于 blast 的缺陷更新 candidates,去除 quick mode
42
+ # 2025.07.04. v2.11.5 offtracker_analysis 提前 skip 已有结果的样本
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: offtracker
3
- Version: 2.11.3
3
+ Version: 2.11.5
4
4
  Summary: Tracking-seq data analysis
5
5
  Home-page: https://github.com/Lan-lab/offtracker
6
6
  Author: Runda Xu
@@ -192,7 +192,8 @@ def main():
192
192
 
193
193
  if args.signal_only:
194
194
  return 'signal_only is on, stop here.'
195
-
195
+
196
+
196
197
  ####################
197
198
  ## group analysis ##
198
199
  ####################
@@ -204,6 +205,11 @@ def main():
204
205
  else:
205
206
  outname = args.outname
206
207
 
208
+ # skip finished
209
+ output = f'Offtracker_result_{outname}.csv'
210
+ if (os.path.isfile(output))&(not args.overwrite):
211
+ return 'skip {output} as the result exists!'
212
+
207
213
  output = f'./temp/df_score_{outname}.csv'
208
214
  if (os.path.isfile(output))&(not args.overwrite):
209
215
  print(f'skip {output}')
@@ -353,33 +359,30 @@ def main():
353
359
  df_result.to_csv(output)
354
360
 
355
361
  output = f'Offtracker_result_{outname}.csv'
356
- if (os.path.isfile(output))&(not args.overwrite):
357
- print(f'skip {output} as the result exists')
362
+ # 2024.06.03. 以防 fdr<=fdr_thresh 滤掉了 track_score>=2 的位点
363
+ bool_fdr = df_result['fdr']<=fdr_thresh
364
+ bool_score = df_result['track_score']>=score_thresh
365
+ # 2025.06.05. BE可能会形成单边信号,导致 track_score 为负数,也保留
366
+ bool_neg_score = df_result['track_score']< -1
367
+ df_output = df_result[bool_fdr|bool_score|bool_neg_score].copy()
368
+ if pattern_ctr != 'none':
369
+ df_output = df_output[['target_location', 'best_strand','best_target','deletion','insertion','mismatch',
370
+ 'exp_L_length', 'exp_R_length','ctr_L_length','ctr_R_length','L_length','R_length','signal_length',
371
+ 'norm_best_seq_score','track_score', 'log2_track_score','fdr','rank']]
372
+ df_output.columns = ['target_location', 'strand', 'target', 'deletion', 'insertion', 'mismatch',
373
+ 'exp_L_length', 'exp_R_length','ctr_L_length','ctr_R_length','L_length','R_length','signal_length',
374
+ 'seq_score', 'track_score', 'log2_track_score','FDR', 'rank']
358
375
  else:
359
- # 2024.06.03. 以防 fdr<=fdr_thresh 滤掉了 track_score>=2 的位点
360
- bool_fdr = df_result['fdr']<=fdr_thresh
361
- bool_score = df_result['track_score']>=score_thresh
362
- # 2025.06.05. BE可能会形成单边信号,导致 track_score 为负数,也保留
363
- bool_neg_score = df_result['track_score']< -1
364
- df_output = df_result[bool_fdr|bool_score|bool_neg_score].copy()
365
- if pattern_ctr != 'none':
366
- df_output = df_output[['target_location', 'best_strand','best_target','deletion','insertion','mismatch',
367
- 'exp_L_length', 'exp_R_length','ctr_L_length','ctr_R_length','L_length','R_length','signal_length',
368
- 'norm_best_seq_score','track_score', 'log2_track_score','fdr','rank']]
369
- df_output.columns = ['target_location', 'strand', 'target', 'deletion', 'insertion', 'mismatch',
370
- 'exp_L_length', 'exp_R_length','ctr_L_length','ctr_R_length','L_length','R_length','signal_length',
371
- 'seq_score', 'track_score', 'log2_track_score','FDR', 'rank']
372
- else:
373
- df_output = df_output[['target_location', 'best_strand','best_target','deletion','insertion','mismatch',
374
- 'L_length', 'R_length','signal_length',
375
- 'norm_best_seq_score','track_score', 'log2_track_score','fdr','rank']]
376
- df_output.columns = ['target_location', 'strand', 'target', 'deletion', 'insertion', 'mismatch',
377
- 'L_length', 'R_length','signal_length',
378
- 'seq_score', 'track_score', 'log2_track_score','FDR', 'rank']
379
- df_output.to_csv(f'Offtracker_result_{outname}.csv', index=False)
380
-
381
- if args.clean:
382
- shutil.rmtree('./temp')
376
+ df_output = df_output[['target_location', 'best_strand','best_target','deletion','insertion','mismatch',
377
+ 'L_length', 'R_length','signal_length',
378
+ 'norm_best_seq_score','track_score', 'log2_track_score','fdr','rank']]
379
+ df_output.columns = ['target_location', 'strand', 'target', 'deletion', 'insertion', 'mismatch',
380
+ 'L_length', 'R_length','signal_length',
381
+ 'seq_score', 'track_score', 'log2_track_score','FDR', 'rank']
382
+ df_output.to_csv(f'Offtracker_result_{outname}.csv', index=False)
383
+
384
+ if args.clean:
385
+ shutil.rmtree('./temp')
383
386
 
384
387
  return 'Done!'
385
388
 
@@ -37,7 +37,7 @@ def main():
37
37
  parser.add_argument('-o','--outdir' , type=str, required=True, help='The output folder')
38
38
  parser.add_argument('-g','--genome' , type=str, default='hg38', help='File of chromosome sizes, or "hg38", "mm10" ')
39
39
  parser.add_argument('-t','--thread' , type=int, default=4, help='Number of threads for parallel computing')
40
- parser.add_argument('--quick_mode' , action='store_true', help='BLAST faster but less candidates.')
40
+ # parser.add_argument('--quick_mode' , action='store_true', help='Quick mode is deprecated due to blast flaw.')
41
41
 
42
42
  args = parser.parse_args()
43
43
 
@@ -57,7 +57,7 @@ def main():
57
57
  os.makedirs(dir_output)
58
58
  dir_ref_fa = args.ref
59
59
  blast_db = args.blastdb
60
- quick_mode = args.quick_mode
60
+ # quick_mode = args.quick_mode
61
61
 
62
62
  # parameters for alignment
63
63
  half_width = 100
@@ -95,13 +95,7 @@ def main():
95
95
  if os.path.isfile(dir_sgRNA_blast):
96
96
  print(f'{dir_sgRNA_blast} exists, skipped.')
97
97
  else:
98
- if quick_mode:
99
- print('Using quick mode for BLAST')
100
- blastx_cline = NcbiblastnCommandline(query=dir_sgRNA_fasta, task='blastn-short',out=dir_sgRNA_blast,
101
- db=blast_db, evalue=100000,outfmt=6, num_threads=n_threads,
102
- gapopen=4, gapextend=2, reward=2, word_size=5, dust='no', soft_masking=False)
103
- else:
104
- blastx_cline = NcbiblastnCommandline(query=dir_sgRNA_fasta, task='blastn-short',out=dir_sgRNA_blast,
98
+ blastx_cline = NcbiblastnCommandline(query=dir_sgRNA_fasta, task='blastn-short',out=dir_sgRNA_blast,
105
99
  db=blast_db, evalue=100000,outfmt=6, num_threads=n_threads,
106
100
  gapopen=4, gapextend=2, reward=2, word_size=4, dust='no', soft_masking=False)
107
101
  print(f'BLAST for candidate off-target sites of {sgRNA_name}.')
File without changes
File without changes
File without changes
File without changes
File without changes