@@ -144,7 +144,8 @@ def results_summary(ronas, use_weights):
144144
145145 if use_weights is True :
146146 means = [str (np .average (list (x .corr_coef .values ()),
147- weights = list (x .corr_coef .values ()))) for x in ronas ]
147+ weights = list (x .corr_coef .values ()))) for x in
148+ ronas ]
148149 else :
149150 means = [str (np .average (list (x .corr_coef .values ()))) for x in ronas ]
150151 print ("Average R²\t %s" % "\t " .join (means ))
@@ -156,8 +157,8 @@ def ronas_filterer(ronas, use_weights, num_covars):
156157 represented covariables.
157158 """
158159 # Delete immutable covariates:
159- immutables = ("1" , "2" , "3" )
160- ronas = {key : ronas [key ] for key in ronas if key not in immutables }
160+ # immutables = ("1", "2", "3")
161+ # ronas = {key: ronas[key] for key in ronas if key not in immutables}
161162
162163 sortable_representation = {}
163164 for k , rona in ronas .items ():
@@ -205,6 +206,13 @@ def argument_parser(args):
205206 "outlier and 2 removes **any** number of "
206207 "outliers that match the distance criteria." )
207208
209+ parameters .add_argument ("-immutables" , dest = "immutables" , type = list ,
210+ default = ["1" , "2" , "3" ], required = False ,
211+ help = "List of immutable covariates. These are "
212+ "not even parsed from the betai file. By "
213+ "default the first 3 covars are skipped. "
214+ "You can enter any other values here." )
215+
208216 parameters .add_argument ("-ronatype" , dest = "rtype" , type = str ,
209217 default = "absdiff" , required = False ,
210218 choices = ["diff" , "absdiff" , "dist" ],
@@ -256,7 +264,7 @@ def main(params):
256264 future_covariates = fp .parse_envfile (arg .future_covars_file )
257265 RonaClass .POP_NAMES = fp .popnames_parser (arg .popnames_file )
258266 assocs = fp .baypass_summary_betai_parser (arg .baypass_summary_betai_file ,
259- arg .bayes_factor )
267+ arg .bayes_factor , arg . immutables )
260268 al_freqs = fp .baypass_pij_parser (arg .baypass_pij_file , assocs )
261269
262270 ronas = {}
0 commit comments