[med-svn] [Git][med-team/cutesv][master] 9 commits: New upstream version 2.1.1
Étienne Mollier (@emollier)
gitlab at salsa.debian.org
Thu Aug 22 17:12:24 BST 2024
Étienne Mollier pushed to branch master at Debian Med / cutesv
Commits:
9cbc7e33 by Étienne Mollier at 2024-08-22T16:39:24+02:00
New upstream version 2.1.1
- - - - -
efcd8224 by Étienne Mollier at 2024-08-22T16:39:26+02:00
Update upstream source from tag 'upstream/2.1.1'
Update to upstream version '2.1.1'
with Debian dir b2fb5de78c6930142b5ab7bf1c1689aa9d0a07c2
- - - - -
178404f8 by Étienne Mollier at 2024-08-22T16:41:13+02:00
no_install_depends_cython.patch: delete: applied upstream.
- - - - -
349dfb3c by Étienne Mollier at 2024-08-22T16:41:52+02:00
d/control: declare compliance to standards version 4.7.0.
- - - - -
5afb3ec5 by Étienne Mollier at 2024-08-22T16:43:49+02:00
PythonPath.patch: declare forwarding not-needed.
- - - - -
e1e604ff by Étienne Mollier at 2024-08-22T16:52:03+02:00
typo.patch: new: fix a typo caught by lintian.
- - - - -
433122ef by Étienne Mollier at 2024-08-22T16:52:11+02:00
d/cuteSV.1: also fix the typo in the maintainer manual page.
- - - - -
42938015 by Étienne Mollier at 2024-08-22T18:09:45+02:00
d/t/{control,run-basic-tests}: new: superficial autopkgtest.
- - - - -
a7ad8b94 by Étienne Mollier at 2024-08-22T18:11:08+02:00
Ready to upload to unstable.
- - - - -
15 changed files:
- README.md
- debian/changelog
- debian/control
- debian/cuteSV.1
- debian/patches/PythonPath.patch
- − debian/patches/no_install_depends_cython.patch
- debian/patches/series
- + debian/patches/typo.patch
- + debian/tests/control
- + debian/tests/run-basic-tests
- 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.
=====================================
debian/changelog
=====================================
@@ -1,3 +1,21 @@
+cutesv (2.1.1-1) unstable; urgency=medium
+
+ * Team upload.
+
+ [ Andreas Tille ]
+ * [skip ci] Forwarded
+
+ [ Étienne Mollier ]
+ * New upstream version 2.1.1
+ * no_install_depends_cython.patch: delete: applied upstream.
+ * d/control: declare compliance to standards version 4.7.0.
+ * PythonPath.patch: declare forwarding not-needed.
+ * typo.patch: new: fix a typo caught by lintian.
+ * d/cuteSV.1: also fix the typo in the maintainer manual page.
+ * d/t/{control,run-basic-tests}: new: superficial autopkgtest.
+
+ -- Étienne Mollier <emollier at debian.org> Thu, 22 Aug 2024 18:10:46 +0200
+
cutesv (2.1.0-2) unstable; urgency=medium
* No runtime dependency from cython
=====================================
debian/control
=====================================
@@ -8,7 +8,7 @@ Build-Depends: debhelper-compat (= 13),
dh-sequence-python3,
python3,
python3-setuptools
-Standards-Version: 4.6.2
+Standards-Version: 4.7.0
Vcs-Browser: https://salsa.debian.org/med-team/cutesv
Vcs-Git: https://salsa.debian.org/med-team/cutesv.git
Homepage: https://github.com/tjiangHIT/cuteSV
=====================================
debian/cuteSV.1
=====================================
@@ -116,7 +116,7 @@ Enable to report supporting read ids for each SV.
\fB\-p\fR MAX_SPLIT_PARTS, \fB\-\-max_split_parts\fR MAX_SPLIT_PARTS
Maximum number of split segments a read may be aligned
before it is ignored. All split segments are
-considered when using \fB\-1\fR. (Recommand \fB\-1\fR when applying
+considered when using \fB\-1\fR. (Recommend \fB\-1\fR when applying
assembly\-based alignment.)[7]
.TP
\fB\-q\fR MIN_MAPQ, \fB\-\-min_mapq\fR MIN_MAPQ
=====================================
debian/patches/PythonPath.patch
=====================================
@@ -1,6 +1,7 @@
Author: Steffen Moeller
Last-Update: 2021-07-19 16:18:03 +0200
Description: Fix interpreter
+Forwarded: not-needed
--- cutesv.orig/src/cuteSV/cuteSV
+++ cutesv/src/cuteSV/cuteSV
=====================================
debian/patches/no_install_depends_cython.patch deleted
=====================================
@@ -1,15 +0,0 @@
-Description: No runtime dependency from cython
-Bug-Debian: https://bugs.debian.org/1057985
-Author: Andreas Tille <tille at debian.org>
-Last-Update: Mon, 11 Dec 2023 13:43:19 +0100
-Forwarded: https://github.com/tjiangHIT/cuteSV/issues/136
-
---- a/setup.py
-+++ b/setup.py
-@@ -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', 'pyvcf', 'scikit-learn']
- )
=====================================
debian/patches/series
=====================================
@@ -1,2 +1,2 @@
PythonPath.patch
-no_install_depends_cython.patch
+typo.patch
=====================================
debian/patches/typo.patch
=====================================
@@ -0,0 +1,28 @@
+Description: fix typo Recommand → Recommend caught by linting.
+Author: Étienne Mollier <emollier at debian.org>
+Forwarded: https://github.com/tjiangHIT/cuteSV/pull/151
+Last-Update: 2024-08-22
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- cutesv.orig/README.md
++++ cutesv/README.md
+@@ -92,7 +92,7 @@
+ |--retain_work_dir|Enable to retain temporary folder and files.|False|
+ |--write_old_sigs|Enable to output temporary sig files.|False|
+ |--report_readid|Enable to report supporting read ids for each SV.|False|
+-|--max_split_parts|Maximum number of split segments a read may be aligned before it is ignored. All split segments are considered when using -1. (Recommand -1 when applying assembly-based alignment.)|7|
++|--max_split_parts|Maximum number of split segments a read may be aligned before it is ignored. All split segments are considered when using -1. (Recommend -1 when applying assembly-based alignment.)|7|
+ |--min_mapq|Minimum mapping quality value of alignment to be taken into account.|20|
+ |--min_read_len|Ignores reads that only report alignments with not longer than bp.|500|
+ |--merge_del_threshold|Maximum distance of deletion signals to be merged.|0|
+--- cutesv.orig/src/cuteSV/cuteSV_Description.py
++++ cutesv/src/cuteSV/cuteSV_Description.py
+@@ -105,7 +105,7 @@
+ GroupSignaturesCollect = parser.add_argument_group('Collection of SV signatures')
+ GroupSignaturesCollect.add_argument('-p', '--max_split_parts',
+ help = "Maximum number of split segments a read may be aligned before it is ignored. All split segments are considered when using -1. \
+- (Recommand -1 when applying assembly-based alignment.)[%(default)s]",
++ (Recommend -1 when applying assembly-based alignment.)[%(default)s]",
+ default = 7,
+ type = int)
+ GroupSignaturesCollect.add_argument('-q', '--min_mapq',
=====================================
debian/tests/control
=====================================
@@ -0,0 +1,12 @@
+Tests: run-basic-tests
+Depends: @, freebayes
+Restrictions: allow-stderr, superficial
+# FIXME: with the freebayes dataset, output VCF files seem to have zero
+# actual output data. It would be nice to have an appropriate dataset
+# for non-void results. Once done, the "superficial" marker can be
+# removed.
+
+#Tests: benchmark
+#Depends: @
+#Restrictions: allow-stderr, needs-internet
+# FIXME: benchmarks need pbsv packaged first before being run.
=====================================
debian/tests/run-basic-tests
=====================================
@@ -0,0 +1,47 @@
+#! /bin/sh
+set -e
+
+if ! dpkg --listfiles freebayes > /dev/null 2>&1
+then
+ cat >&2 <<-END
+ error: package freebayes needed: provides test data for cuteSV.
+ END
+ exit 1
+fi
+
+if [ "$AUTOPKGTEST_TMP" = "" ]
+then
+ AUTOPKGTEST_TMP="$(mktemp -d /tmp/cutesv-test.XXXXXX)"
+ trap "rm -rf $AUTOPKGTEST_TMP" 0 INT QUIT ABRT PIPE TERM
+fi
+
+cd "$AUTOPKGTEST_TMP"
+
+set -x
+cuteSV --version
+cuteSV --help
+cuteSV \
+ /usr/share/doc/freebayes/examples/tiny/NA12878.chr22.tiny.hla.bam \
+ /usr/share/doc/freebayes/examples/tiny/hla.fa \
+ out1.vcf .
+cuteSV -t "$(nproc)" \
+ /usr/share/doc/freebayes/examples/tiny/1read.bam \
+ /usr/share/doc/freebayes/examples/tiny/hla.fa \
+ out2.vcf .
+cuteSV --genotype \
+ /usr/share/doc/freebayes/examples/tiny/NA12878.chr22.tiny.bam \
+ /usr/share/doc/freebayes/examples/tiny/q.fa \
+ out3.vcf .
+cuteSV -t "$(nproc)" --genotype \
+ /usr/share/doc/freebayes/examples/splice/1:883884-887618.bam \
+ /usr/share/doc/freebayes/examples/splice/1:883884-887618.fa \
+ out4.vcf .
+
+for vcf in out*.vcf
+do
+ test "$(sed -n '1s/v[0-9.]\+$//p' "$vcf")" = "##fileformat=VCF"
+ test "$(sed -n '2s/-[0-9.]\+$//p' "$vcf")" = "##source=cuteSV"
+done
+
+set +x
+echo PASS
=====================================
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/-/compare/c3b6c1c53f8943f085e2940055ba696007530725...a7ad8b94cad9a50e531eed0ad2a305ed36104d63
--
View it on GitLab: https://salsa.debian.org/med-team/cutesv/-/compare/c3b6c1c53f8943f085e2940055ba696007530725...a7ad8b94cad9a50e531eed0ad2a305ed36104d63
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/18e54e58/attachment-0001.htm>
More information about the debian-med-commit
mailing list