Skip to content

Commit

Permalink
fixed typo issue 165 and None error in regions used
Browse files Browse the repository at this point in the history
  • Loading branch information
panushri25 committed Dec 16, 2023
1 parent d256f09 commit a5c231f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions chrombpnet/evaluation/make_bigwigs/bigwig_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions chrombpnet/helpers/preprocessing/reads_to_bigwig.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)")
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit a5c231f

Please sign in to comment.