Skip to content

Commit 795ddb7

Browse files
committed
change the argparser for enhancer
1 parent 0b5737e commit 795ddb7

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

src/GPS/config.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -110,23 +110,25 @@ def get_dataclass_from_parser(parser, data_class: dataclass):
110110

111111
def add_generate_ldscore_args(parser):
112112
parser.add_argument('--sample_name', type=str, required=True, help='Sample name')
113-
parser.add_argument('--chrom', type=chrom_choice, required=True, help='Chromosome number (1-22) or "all"')
113+
parser.add_argument('--chrom', type=str, required=True, help='Chromosome number (1-22) or "all"')
114114
parser.add_argument('--ldscore_save_dir', type=str, required=True, help='Directory to save ld score files')
115-
parser.add_argument('--gtf_annotation_file', type=str, required=True, help='GTF file path')
116115
parser.add_argument('--mkscore_feather_file', type=str, required=True, help='Mkscore feather file path')
117116
parser.add_argument('--bfile_root', type=str, required=True, help='Bfile root path')
118117
parser.add_argument('--keep_snp_root', type=str, required=True, help='Keep SNP root path')
119118

120-
# enhancer annotation
121-
parser.add_argument('--enhancer_annotation', type=str, default=None, help='Enhancer annotation bed file path, optional.')
119+
# Annotation by gene distance
120+
parser.add_argument('--gtf_annotation_file', type=str, required=True, help='GTF file path')
121+
parser.add_argument('--gene_window_size', type=int, default=50000, help='Gene window size')
122122

123-
# Arguments with defaults
124-
parser.add_argument('--window_size', type=int, default=50000, help='Annotation window size for each gene')
123+
# Enhancer annotation
124+
parser.add_argument('--enhancer_annotation_file', type=str, default=None, help='Enhancer annotation bed file path, optional.')
125+
parser.add_argument('--snp_multiple_enhancer_strategy', type=str, default='max_mkscore', choices=['max_mkscore', 'nearest_TSS'], help='Strategy for multiple enhancers per SNP')
126+
parser.add_argument('--gene_window_enhancer_priority', type=str, default=None, choices=['gene_window_first', 'enhancer_first', 'enhancer_only'], help='Priority between gene window and enhancer')
127+
128+
# Arguments for calculating ld score
125129
parser.add_argument('--spots_per_chunk', type=int, default=5_000, help='Number of spots per chunk')
126130
parser.add_argument('--ld_wind', type=int, default=1, help='LD window size')
127-
parser.add_argument('--ld_unit', type=str, default='CM', help='LD window unit (SNP/KB/CM)',
128-
choices=['SNP', 'KB', 'CM'])
129-
131+
parser.add_argument('--ld_unit', type=str, default='CM', help='LD window unit (SNP/KB/CM)', choices=['SNP', 'KB', 'CM'])
130132

131133
def add_latent_to_gene_args(parser):
132134
parser.add_argument('--input_hdf5_with_latent_path', type=str, required=True,

0 commit comments

Comments
 (0)