diff --git a/bin/CrossMap.py b/bin/CrossMap.py index 8e91ddf..a1e0039 100755 --- a/bin/CrossMap.py +++ b/bin/CrossMap.py @@ -29,7 +29,7 @@ __copyright__ = "Copyleft" __credits__ = [] __license__ = "GPLv2" -__version__="0.6.3" +__version__="0.6.4" __maintainer__ = "Liguo Wang" __email__ = "wangliguo78@gmail.com" __status__ = "Production" diff --git a/build/lib/cmmodule/mapvcf.py b/build/lib/cmmodule/mapvcf.py index 75500cd..b47820b 100644 --- a/build/lib/cmmodule/mapvcf.py +++ b/build/lib/cmmodule/mapvcf.py @@ -67,6 +67,7 @@ def crossmap_vcf_file(mapping, infile, outfile, liftoverfile, refgenome, noCompA total = 0 fail = 0 + chr_template = 'chr1' #if there is no contig field, use this chrom ID style. for line in ireader.reader(infile): if not line.strip(): @@ -139,10 +140,13 @@ def crossmap_vcf_file(mapping, infile, outfile, liftoverfile, refgenome, noCompA continue if len(a) == 2: + # update chrom target_chr = str(a[1][0]) #target_chr is from chain file, could be 'chr1' or '1' target_start = a[1][1] target_end = a[1][2] + target_size = target_end - target_start + fields[0] = target_chr # update start coordinate diff --git a/build/lib/cmmodule/meta_data.py b/build/lib/cmmodule/meta_data.py index 4e00e8f..0d19d11 100644 --- a/build/lib/cmmodule/meta_data.py +++ b/build/lib/cmmodule/meta_data.py @@ -3,7 +3,7 @@ __copyright__ = "Copyleft" __credits__ = [] __license__ = "GPLv2" -__version__="0.6.3" +__version__="0.6.4" __maintainer__ = "Liguo Wang" __email__ = "wangliguo78@gmail.com" __status__ = "Production" diff --git a/build/lib/cmmodule/utils.py b/build/lib/cmmodule/utils.py index a96b5b9..681b0f1 100644 --- a/build/lib/cmmodule/utils.py +++ b/build/lib/cmmodule/utils.py @@ -173,7 +173,10 @@ def bigwigReader(infile): bw = pyBigWig.open(infile) chrom_sizes = bw.chroms() for chr_name, chr_size in list(chrom_sizes.items()): - for i_st, i_end, i_score in bw.intervals(chr_name, 0, chr_size): + intervals = bw.intervals(chr_name, 0, chr_size) + if intervals is None: + continue + for i_st, i_end, i_score in intervals: yield(( chr_name, i_st, i_end, i_score )) def check_bed12(bedline): diff --git a/build/scripts-3.8/CrossMap.py b/build/scripts-3.8/CrossMap.py index 62a0e6a..bb39f7f 100755 --- a/build/scripts-3.8/CrossMap.py +++ b/build/scripts-3.8/CrossMap.py @@ -29,7 +29,7 @@ __copyright__ = "Copyleft" __credits__ = [] __license__ = "GPLv2" -__version__="0.6.3" +__version__="0.6.4" __maintainer__ = "Liguo Wang" __email__ = "wangliguo78@gmail.com" __status__ = "Production" diff --git a/docs/index.rst b/docs/index.rst index 239162a..a6485e8 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -36,8 +36,8 @@ Release history **07/12/2022: Release version 0.6.4** -1. Fix bug when the input bigwig file does not have coverage signal for some chromsomes. -2. When the input VCF file does not have CONTIG field, use long chromosmoe ID (e.g., "chr1") as default. +1. Fix bug when the input bigwig file does not have coverage signal for some chromosomes. +2. When the input VCF file does not have CONTIG field, use long chromosome ID (e.g., "chr1") as default. **03/04/2022: Release version 0.6.3** diff --git a/lib/CrossMap.egg-info/PKG-INFO b/lib/CrossMap.egg-info/PKG-INFO index 25b9aac..36dcc58 100644 --- a/lib/CrossMap.egg-info/PKG-INFO +++ b/lib/CrossMap.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: CrossMap -Version: 0.6.3 +Version: 0.6.4 Summary: Lift over genomics coordinates between assemblies Home-page: https://crossmap.readthedocs.io/en/latest/ Author: Liguo Wang diff --git a/lib/cmmodule/__pycache__/mapvcf.cpython-38.pyc b/lib/cmmodule/__pycache__/mapvcf.cpython-38.pyc index f452f7c..9dad071 100644 Binary files a/lib/cmmodule/__pycache__/mapvcf.cpython-38.pyc and b/lib/cmmodule/__pycache__/mapvcf.cpython-38.pyc differ diff --git a/lib/cmmodule/__pycache__/meta_data.cpython-38.pyc b/lib/cmmodule/__pycache__/meta_data.cpython-38.pyc index 3dd6c98..6d2912d 100644 Binary files a/lib/cmmodule/__pycache__/meta_data.cpython-38.pyc and b/lib/cmmodule/__pycache__/meta_data.cpython-38.pyc differ diff --git a/lib/cmmodule/__pycache__/utils.cpython-38.pyc b/lib/cmmodule/__pycache__/utils.cpython-38.pyc index bd155db..c821eff 100644 Binary files a/lib/cmmodule/__pycache__/utils.cpython-38.pyc and b/lib/cmmodule/__pycache__/utils.cpython-38.pyc differ