Skip to content

Commit 6cfe504

Browse files
committed
[MODIF] add support for .vcf.gz
1 parent bddf958 commit 6cfe504

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

CHANGELOG

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ CHANGES IN VERSION 3.0.0
33

44
NEW FEATURES
55

6+
o vcf file can be zipped in vcf.gz
7+
68
o Add a Dockerfile for automatic Docker build on DockerHub
79

810
o Set up Travis continuous testing
@@ -15,6 +17,8 @@ NEW FEATURES
1517

1618
SIGNIFICANT USER-VISIBLE CHANGES
1719

20+
o SORT_RAM is not divided by N_CPU for samtools (#369)
21+
1822
o Fix bug in make_viewpoints.py if multiple viewpoints are specified in the bed file
1923

2024
o Add '--float' option for hicpro2higlass to manage normalized Hi-C data

doc/MANUAL.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,12 @@ Copy and edit the configuration file *'config-hicpro.txt'* in your local folder.
7070

7171
----------------
7272

73-
| ANNOTATION FILES | |
74-
|-----------------------|-----------------------------------------------------------------------------------------------------------------------------------|
75-
| REFERENCE_GENOME | Reference genome prefix used for genome indexes. *Default: hg19* |
76-
| GENOME_SIZE | Chromsome size file. Loaded from the ANNOTATION folder in the HiC-Pro installation directory. *Default: chrom_hg19.sizes* |
77-
| [CAPTURE_TARGET] | BED file of target regions to focus on (mainly used for capture Hi-C data) |
78-
| [ALLELE_SPECIFIC_SNP] | VCF file to SNPs which can be used to distinguish parental origin. See the [allele specific section]( AS.md) for details |
73+
| ANNOTATION FILES | |
74+
|-----------------------|----------------------------------------------------------------------------------------------------------------------------------------------|
75+
| REFERENCE_GENOME | Reference genome prefix used for genome indexes. *Default: hg19* |
76+
| GENOME_SIZE | Chromsome size file. Loaded from the ANNOTATION folder in the HiC-Pro installation directory. *Default: chrom_hg19.sizes* |
77+
| [CAPTURE_TARGET] | BED file of target regions to focus on (mainly used for capture Hi-C data) |
78+
| [ALLELE_SPECIFIC_SNP] | VCF file (.vcf or .vcf.gz) to SNPs which can be used to distinguish parental origin. See the [allele specific section]( AS.md) for details |
7979

8080
----------------
8181

scripts/markAllelicStatus.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import os
1818
import re
1919
import pysam
20-
20+
import gzip
2121

2222
def usage():
2323
"""Usage function"""
@@ -93,7 +93,10 @@ def load_vcf(in_file, filter_qual=False, verbose=False, debug=False):
9393
if verbose:
9494
print("## Loading VCF file {} ...".format(in_file))
9595

96-
vcf_handle = open(in_file)
96+
if ".gz" in in_file:
97+
vcf_handle = gzip.open(in_file, 'r')
98+
else:
99+
vcf_handle = open(in_file)
97100
header = []
98101
samples = []
99102
snps = {}

0 commit comments

Comments
 (0)