Skip to content

Commit

Permalink
v0.6.4
Browse files Browse the repository at this point in the history
  • Loading branch information
liguowang committed Jul 12, 2022
1 parent ee1d3f4 commit 8935dbe
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bin/CrossMap.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 4 additions & 0 deletions build/lib/cmmodule/mapvcf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion build/lib/cmmodule/meta_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
5 changes: 4 additions & 1 deletion build/lib/cmmodule/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion build/scripts-3.8/CrossMap.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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**

Expand Down
2 changes: 1 addition & 1 deletion lib/CrossMap.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Binary file modified lib/cmmodule/__pycache__/mapvcf.cpython-38.pyc
Binary file not shown.
Binary file modified lib/cmmodule/__pycache__/meta_data.cpython-38.pyc
Binary file not shown.
Binary file modified lib/cmmodule/__pycache__/utils.cpython-38.pyc
Binary file not shown.

0 comments on commit 8935dbe

Please sign in to comment.