Skip to content

Commit eaa0fe5

Browse files
committed
removed deprecated code commands and fixed indices in augment.py
1 parent 33e5007 commit eaa0fe5

File tree

3 files changed

+24
-22
lines changed

3 files changed

+24
-22
lines changed

chrombpnet/parsers.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ def read_parser():
3636
# downstream tool parsers
3737
preds_parser = subparsers.add_parser("pred_bw", help="Get model prediction bigwigs (Metrics calculated if observed bigwig provided)")
3838
contribs_parser = subparsers.add_parser("contribs_bw", help="Get contribution score bigwigs")
39-
motifs_parser = subparsers.add_parser("modisco_motifs", help="(Will soon be deprecated: use modisco motifs from tfmodisco lite) Summarize motifs from contribution scores with TFModisco")
39+
#motifs_parser = subparsers.add_parser("modisco_motifs", help="(Will soon be deprecated: use modisco motifs from tfmodisco lite) Summarize motifs from contribution scores with TFModisco")
4040
#custom_preds_parser = subparsers.add_parser("pred_custom", help="Make model predictions on custom sequences and output to .h5 file")
4141
#custom_contribs_parser = subparsers.add_parser("contribs_custom", help="Get contribution on custom sequences and output to .h5 file")
4242
footprints_parser = subparsers.add_parser("footprints", help="Get marginal footprinting for given model and given motifs")
43-
variants_parser = subparsers.add_parser("snp_score", help="Score SNPs with model")
43+
#variants_parser = subparsers.add_parser("snp_score", help="Score SNPs with model")
4444

4545
def general_training_args(required_train, optional_train):
4646

@@ -262,31 +262,31 @@ def general_training_args(required_train, optional_train):
262262

263263
# Do variant scoring
264264

265-
variants_parser._action_groups.pop()
266-
required_ves = variants_parser.add_argument_group('required arguments')
267-
optional_ves = variants_parser.add_argument_group('optional arguments')
268-
required_ves.add_argument("-snps", "--snp-data", type=str, required=True, help="Path to a tsv output with the following information in columns - chr, position to insert allele (0-based), ref allele, alt allele")
269-
required_ves.add_argument("-m", "--model-h5", type=str, required=True, help="Path model .h5 file")
270-
required_ves.add_argument("-g", "--genome", type=str, required=True, help="Genome fasta")
271-
required_ves.add_argument("-op", "--output-prefix", type=str, required=True, help="Output prefix for bigwig files")
265+
#variants_parser._action_groups.pop()
266+
#required_ves = variants_parser.add_argument_group('required arguments')
267+
#optional_ves = variants_parser.add_argument_group('optional arguments')
268+
#required_ves.add_argument("-snps", "--snp-data", type=str, required=True, help="Path to a tsv output with the following information in columns - chr, position to insert allele (0-based), ref allele, alt allele")
269+
#required_ves.add_argument("-m", "--model-h5", type=str, required=True, help="Path model .h5 file")
270+
#required_ves.add_argument("-g", "--genome", type=str, required=True, help="Genome fasta")
271+
#required_ves.add_argument("-op", "--output-prefix", type=str, required=True, help="Output prefix for bigwig files")
272272

273-
optional_ves.add_argument("-bs", "--batch-size", type=int, default=64, help="batch size to use for prediction")
274-
optional_ves.add_argument("-dm","--debug-mode-on", type=int, default=0, help="Use this mode to print the flanks of first five SNP insert locations")
273+
#optional_ves.add_argument("-bs", "--batch-size", type=int, default=64, help="batch size to use for prediction")
274+
#optional_ves.add_argument("-dm","--debug-mode-on", type=int, default=0, help="Use this mode to print the flanks of first five SNP insert locations")
275275

276276

277277
# Run TF-Modisco
278278

279-
motifs_parser._action_groups.pop()
280-
required_tfm = motifs_parser.add_argument_group('required arguments')
281-
optional_tfm = motifs_parser.add_argument_group('optional arguments')
279+
#motifs_parser._action_groups.pop()
280+
#required_tfm = motifs_parser.add_argument_group('required arguments')
281+
#optional_tfm = motifs_parser.add_argument_group('optional arguments')
282282

283-
required_tfm.add_argument("-i", "--h5py", type=str, required=True, help="A legacy h5py file containing the one-hot encoded sequences and shap scores.")
284-
required_tfm.add_argument("-n", "--max-seqlets", type=int, required=True, help="The maximum number of seqlets per metacluster.")
285-
required_tfm.add_argument("-op", "--output-prefix", type=str, required=True, help="The path to the output file.")
283+
#required_tfm.add_argument("-i", "--h5py", type=str, required=True, help="A legacy h5py file containing the one-hot encoded sequences and shap scores.")
284+
#required_tfm.add_argument("-n", "--max-seqlets", type=int, required=True, help="The maximum number of seqlets per metacluster.")
285+
#required_tfm.add_argument("-op", "--output-prefix", type=str, required=True, help="The path to the output file.")
286286

287-
optional_tfm.add_argument("-l", "--n-leiden", type=int, default=2, help="The number of Leiden clusterings to perform with different random seeds.")
288-
optional_tfm.add_argument("-w", "--window", type=int, default=500, help="The window surrounding the peak center that will be considered for motif discovery.")
289-
optional_tfm.add_argument("-v", "--verbose", action="store_true", default=False, help="Controls the amount of output from the code.")
287+
#optional_tfm.add_argument("-l", "--n-leiden", type=int, default=2, help="The number of Leiden clusterings to perform with different random seeds.")
288+
#optional_tfm.add_argument("-w", "--window", type=int, default=500, help="The window surrounding the peak center that will be considered for motif discovery.")
289+
#optional_tfm.add_argument("-v", "--verbose", action="store_true", default=False, help="Controls the amount of output from the code.")
290290

291291

292292
# Pull the arguments

chrombpnet/training/utils/augment.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ def random_crop(seqs, labels, seq_crop_width, label_crop_width, coords):
3131
starts = np.random.choice(range(max_start+1), size=seqs.shape[0], replace=True)
3232

3333
new_coords = coords.copy()
34-
new_coords[:,1] = new_coords[:,1].astype(int) - (seqs.shape[1]//2) + starts
34+
#new_coords[:,1] = new_coords[:,1].astype(int) - (seqs.shape[1]//2) + starts
35+
new_coords[:,1] = new_coords[:,1].astype(int) + starts
3536

3637
return take_per_row(seqs, starts, seq_crop_width), take_per_row(labels, starts, label_crop_width), new_coords
3738

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@
1010
'name': 'chrombpnet',
1111
'author_email': 'anusri @ stanford.edu',
1212
'license': 'MIT',
13+
'license_files': ('LICENSE.txt',),
1314
'include_package_data': True,
1415
'description': 'chrombpnet predicts chromatin accessibility from sequence',
1516
'download_url': 'https://github.com/kundajelab/chrombpnet',
16-
'version': '0.1.7',
17+
'version': '1.0.1',
1718
'packages': find_packages(),
1819
'python_requires': '>=3.8',
1920
'install_requires': install_requires,

0 commit comments

Comments
 (0)