diff --git a/chrombpnet/evaluation/make_bigwigs/bigwig_helper.py b/chrombpnet/evaluation/make_bigwigs/bigwig_helper.py index 23611d8b..92526574 100644 --- a/chrombpnet/evaluation/make_bigwigs/bigwig_helper.py +++ b/chrombpnet/evaluation/make_bigwigs/bigwig_helper.py @@ -38,10 +38,10 @@ def get_regions(regions_file, seqlen, regions_used=None): regions = pd.read_csv(regions_file,sep='\t',header=None) #print(regions) - if regions_used: - regions = [[x[0], int(x[1])+int(x[9])-seqlen//2, int(x[1])+int(x[9])+seqlen//2, int(x[1])+int(x[9])] for x in np.array(regions.values)[regions_used]] - else: + if regions_used is None: regions = [[x[0], int(x[1])+int(x[9])-seqlen//2, int(x[1])+int(x[9])+seqlen//2, int(x[1])+int(x[9])] for x in np.array(regions.values)] + else: + regions = [[x[0], int(x[1])+int(x[9])-seqlen//2, int(x[1])+int(x[9])+seqlen//2, int(x[1])+int(x[9])] for x in np.array(regions.values)[regions_used]] return regions diff --git a/chrombpnet/helpers/preprocessing/reads_to_bigwig.py b/chrombpnet/helpers/preprocessing/reads_to_bigwig.py index b73bb338..ef366e63 100644 --- a/chrombpnet/helpers/preprocessing/reads_to_bigwig.py +++ b/chrombpnet/helpers/preprocessing/reads_to_bigwig.py @@ -18,9 +18,9 @@ def parse_args(): parser.add_argument('-c', '--chrom-sizes', type=str, required=True, help="Chrom sizes file") parser.add_argument('-op', '--output-prefix', type=str, required=True, help="Output prefix (path/to/prefix)") parser.add_argument('-d', '--data-type', required=True, type=str, choices=['ATAC', 'DNASE'], help="assay type") - parser.add_argumen('--bsort', required=False, default=False, action='store_true', help="use bedtools sort (default is unix sort)") - parser.add_argumen('--no-st', required=False, default=False, action='store_true', help="No streaming in preprocessing") - parser.add_argumen('--tmpdir', required=False, type=str, default=None, help="tmp dir path for unix sort command") + parser.add_argument('--bsort', required=False, default=False, action='store_true', help="use bedtools sort (default is unix sort)") + parser.add_argument('--no-st', required=False, default=False, action='store_true', help="No streaming in preprocessing") + parser.add_argument('--tmpdir', required=False, type=str, default=None, help="tmp dir path for unix sort command") parser.add_argument('-ps', '--plus-shift', type=int, default=None, help="Plus strand shift applied to reads. Estimated if not specified") parser.add_argument('-ms', '--minus-shift', type=int, default=None, help="Minus strand shift applied to reads. Estimated if not specified") parser.add_argument('--ATAC-ref-path', type=str, default=None, help="Path to ATAC reference motifs (chrombpnet/data/ATAC.ref.motifs.txt used by default)") diff --git a/setup.py b/setup.py index 80278950..fcbe3912 100755 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ 'include_package_data': True, 'description': 'chrombpnet predicts chromatin accessibility from sequence', 'download_url': 'https://github.com/kundajelab/chrombpnet', - 'version': '0.1.6', + 'version': '0.1.7', 'packages': find_packages(), 'python_requires': '>=3.8', 'install_requires': install_requires,