[med-svn] [Git][med-team/cutesv][upstream] New upstream version 2.1.1

Étienne Mollier (@emollier) gitlab at salsa.debian.org
Thu Aug 22 17:12:41 BST 2024



Étienne Mollier pushed to branch upstream at Debian Med / cutesv


Commits:
9cbc7e33 by Étienne Mollier at 2024-08-22T16:39:24+02:00
New upstream version 2.1.1
- - - - -


6 changed files:

- README.md
- setup.py
- src/cuteSV/cuteSV
- src/cuteSV/cuteSV_Description.py
- src/cuteSV/cuteSV_forcecalling.py
- src/cuteSV/cuteSV_genotype.py


Changes:

=====================================
README.md
=====================================
@@ -50,11 +50,13 @@ We provided a new document for applying **force calling** (or **regenotyping**)
 ### Dependence
 	
 	1. python3
+ 	2. scipy
 	2. pysam
 	3. Biopython
 	4. cigar
 	5. numpy
-	6. pyvcf
+	6. pyvcf3
+ 	7. scikit-learn
 
 ---
 ### Usage
@@ -124,7 +126,12 @@ Please cite the manuscript of cuteSV before using these callsets.
 
 ---
 ### Changelog
-	cuteSV (v2.1.0)
+	cuteSV (v2.1.1)
+	1. fix bugs in resolving reference genomes
+ 	2. modify several dependencies and remove some useless dependencies
+  	3. update several evaluation scripts
+ 
+ 	cuteSV (v2.1.0)
  	1. Speed up both SV discovery calling and force calling comprehensively.
   	2. Upgrade the force calling module.
    	3. Modify the temporary files. The sigs file are only generated with the "write_old_sigs" parameter.


=====================================
setup.py
=====================================
@@ -7,7 +7,7 @@ with open('README.md') as f:
 
 setup(
     name = "cuteSV",
-    version = "2.1.0",
+    version = "2.1.1",
     description = "Long-read-based human genomic structural variation detection with cuteSV",
     author = "Jiang Tao",
     author_email = "tjiang at hit.edu.cn",
@@ -21,5 +21,5 @@ setup(
     long_description = readme,
     long_description_content_type = 'text/markdown',
     zip_safe = False,
-    install_requires = ['scipy', 'Cython', 'pysam', 'Biopython', 'Cigar', 'numpy', 'pyvcf', 'scikit-learn']
+    install_requires = ['scipy', 'pysam', 'Biopython', 'Cigar', 'numpy', 'pyvcf3', 'scikit-learn']
 )


=====================================
src/cuteSV/cuteSV
=====================================
@@ -4,8 +4,8 @@
  * All rights Reserved, Designed By HIT-Bioinformatics   
  * @Title: cuteSV 
  * @author: tjiang & sqcao & zdzhang
- * @date: Nov. 29th 2023
- * @version V2.1.0
+ * @date: Apr. 4th 2024
+ * @version V2.1.1
 '''
 
 import pysam
@@ -193,6 +193,9 @@ def analysis_split_read(split_read, SV_size, RLength, read_name, candidate, MaxS
     #0			#1			#2			#3		#4	#5
     '''
     SP_list = sorted(split_read, key = lambda x:x[0])
+    # print(read_name)
+    # for i in SP_list:
+    #     print(i)
 
     # detect INS involoved in a translocation
     trigger_INS_TRA = 0	
@@ -1021,8 +1024,8 @@ def main_ctrl(args, argv):
             if pos < local_ref_len:
                 Task_list.append([i[0], pos, local_ref_len])
     bed_regions = load_bed(args.include_bed, Task_list)
-    #'''
     
+    #'''
     candidates={}
     candidates["DEL"]=list()
     candidates["INS"]=list()
@@ -1053,9 +1056,8 @@ def main_ctrl(args, argv):
     pids = [process.pid for process in analysis_pools._pool]
     analysis_pools.close()
     analysis_pools.join()
-    #'''
     logging.info("Rebuilding signatures of structural variants.")
-
+    #'''
     analysis_pools = Pool(processes=int(args.threads))
     paras=[]
     for sv_type in SVTYPES:
@@ -1077,7 +1079,7 @@ def main_ctrl(args, argv):
     del candidates
     gc.collect()
     logging.info("Rebuilding signatures completed.")
-    #'''
+
     result = list()
 
     if args.Ivcf != None:


=====================================
src/cuteSV/cuteSV_Description.py
=====================================
@@ -2,12 +2,12 @@
  * All rights Reserved, Designed By HIT-Bioinformatics   
  * @Title:  cuteSV_Description.py
  * @author: tjiang & sqcao & zdzhang
- * @date: Nov. 29th 2023
- * @version V2.1.0
+ * @date: Apr. 4th 2024
+ * @version V2.1.1
 '''
 import argparse
 
-VERSION = '2.1.0'
+VERSION = '2.1.1'
 
 class cuteSVdp(object):
 	'''


=====================================
src/cuteSV/cuteSV_forcecalling.py
=====================================
@@ -576,8 +576,11 @@ def solve_fc(chrom_list, svs_dict, temporary_dir, max_cluster_bias_dict, thresho
     reads_info = dict() # [10000, 10468, 0, 'm54238_180901_011437/52298335/ccs']
     readsfile = open("%sreads.pickle"%(temporary_dir), 'rb')
     for chrom in chrom_list:
-        readsfile.seek(sigs_index["reads"][chrom])
-        reads_info[chrom]=pickle.load(readsfile)
+        try:
+            readsfile.seek(sigs_index["reads"][chrom])
+            reads_info[chrom]=pickle.load(readsfile)
+        except:
+            reads_info[chrom] = []
     readsfile.close()
     sv_dict = dict()
     for sv_type in ["DEL", "DUP", "INS", "INV", "TRA"]:


=====================================
src/cuteSV/cuteSV_genotype.py
=====================================
@@ -246,14 +246,17 @@ def generate_output(args, semi_result, reference, chrom, temporary_dir):
 
     # genotype_trigger = TriggerGT[args.genotype]
 
+    f=open("%sresults/%s.pickle"%(temporary_dir,chrom), "wb")
     semi_result.sort(key = lambda x:int(x[2]))
     action = args.genotype
     fa_file = pysam.FastaFile(reference)
-    ref_chrom=fa_file.fetch(chrom)
+    try:
+        ref_chrom=fa_file.fetch(chrom)
+    except:
+        raise Exception("No corresponding contig in reference with %s."%(chrom))
     fa_file.close()
     lines=[]
     BATCH_SIZE=1000
-    f=open("%sresults/%s.pickle"%(temporary_dir,chrom), "wb")
     for i in semi_result:
         if i[1] in ["DEL", "INS"]:
             if abs(int(float(i[3]))) > args.max_size and args.max_size != -1:
@@ -422,7 +425,10 @@ def generate_output(args, semi_result, reference, chrom, temporary_dir):
 # def generate_pvcf(args, result, contigINFO, argv, ref_g):
 def generate_pvcf(args, result, reference, chrom):
     fa_file = pysam.FastaFile(reference)
-    ref_chrom=fa_file.fetch(chrom)
+    try:
+        ref_chrom=fa_file.fetch(chrom)
+    except:
+        raise Exception("No corresponding contig in reference with %s."%(chrom))
     fa_file.close()
     # file = open(args.output, 'w')
     # Generation_VCF_header(file, contigINFO, args.sample, argv)



View it on GitLab: https://salsa.debian.org/med-team/cutesv/-/commit/9cbc7e3399ba2ead3991c5772d6dd3aad10d3472

-- 
View it on GitLab: https://salsa.debian.org/med-team/cutesv/-/commit/9cbc7e3399ba2ead3991c5772d6dd3aad10d3472
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20240822/5641d716/attachment-0001.htm>


More information about the debian-med-commit mailing list