Skip to content

Commit

Permalink
Merge pull request #5 from ossmith/dev-1.1
Browse files Browse the repository at this point in the history
MINOR: fix output stem defaults
  • Loading branch information
ossmith authored Jan 9, 2024
2 parents 582aacd + 415695e commit 55296cd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hare.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,13 @@ def main():

########################## SIGTEST ARGUMENTS ##########################
sigtest.add_argument('--input','-i', type=str, help="Filepath to results file from HARE with simulation and element set intersection/bp values. Can also be a comma-separated list.", required=True)
sigtest.add_argument('--out', '-o', type=str, help="Output filepath. Default is \'hare\' if none provided.", required=False, default=None)
sigtest.add_argument('--out', '-o', type=str, help="Output filepath. Defaults to input stem if none provided.", required=False, default=None)
# sigtest.add_argument('--distribution', type=str, help="Distribution to use for significance testing. Options are (case insensitive) NORMAL, WEIBULL, BETA, GAMMA. Default is WEIBULL.", required=False, default="weibull")
sigtest.add_argument('--skip_plot', action="store_true", help="Skip plotting of results. Default is OFF (will plot by default).")

########################## PRERANK ARGUMENTS ##########################
prerank.add_argument('--input', '-i', type=str, help='Filepath of file with p-values.', required=True)
prerank.add_argument('--output', '-o', type=str, help='Output stem for filenames. Default \"HARE\" if none provided.', required=False, default='HARE')
prerank.add_argument('--output', '-o', type=str, help='Output stem for filenames. Defaults to input stem if none provided.', required=False, default=None)
prerank.add_argument('--ref_build', '-b', type=str, help="GRCh reference build. Options are either 37 (hg19) or 38 (hg38). Default is 37.", required=False, default="37")
prerank.add_argument('--topN', '-n', type=int, help='Number of lowest p-value positions to use. No default.', required=False, default=None)
prerank.add_argument('--pval', '-p', type=float, help='P-value threshold for annotated genes. Default is 1.', required=False, default=1)
Expand Down
6 changes: 6 additions & 0 deletions src/hareclasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ class PrerankArgumentContainer:
def __init__(self, input, output, ref_build, buffer, biotypes, topN, pval_col, chr_col, pos_col, pval, dmpN, dmpP, dmpD, chr, excl, incl, score_method, call_peaks):
self.input = input
self.output = output

if output == None:
self.output = os.path.splitext(ntpath.basename(input))[0]
else:
self.output = output

self.build = ref_build
self.buffer = buffer
self.biotypes = biotypes
Expand Down

0 comments on commit 55296cd

Please sign in to comment.