Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions gwas/aou/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Optional arguments:
* `--MAF`: Apply minor allele frequency QC. Default=0.01
* `--HWE`: Apply HWE p-value cutoff QC. Default=1e-15
* `--GQ`: Apply minimun genotype score QC. Default=20
* `--beagle-dosages`: Apply beagle dosages flag to associaTR. Default=false


## Important file locations:
Expand Down
3 changes: 2 additions & 1 deletion gwas/aou/aou_gwas.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ def main():
parser.add_argument("--MAF", help="Apply minor allele frequency QC", type=float, default=0.01)
parser.add_argument("--HWE", help="Apply HWE p-value cutoff QC", type=float, default=1e-100)
parser.add_argument("--GQ", help="Apply minimun genotype score QC", type=int, default=20)
parser.add_argument("--beagle-dosages", help="Apply beagle dosages flag to associaTR ,Default: False",action="store_true")
args = parser.parse_args()

# Set up paths
Expand Down Expand Up @@ -185,7 +186,7 @@ def main():
runner = HailRunner(data, region=args.region, covars=covars, sample_call_rate=args.sample_call_rate, variant_call_rate=args.variant_call_rate, MAF=args.MAF, HWE=args.HWE, GQ=args.GQ)
elif args.method == "associaTR":
from associatr_runner import AssociaTRRunner
runner = AssociaTRRunner(data, args.tr_vcf, region=args.region, covars=covars)
runner = AssociaTRRunner(data, args.tr_vcf, region=args.region, covars=covars, beagle=args.beagle_dosages)
else:
ERROR("GWAS method %s not implemented" % args.method)

Expand Down
7 changes: 4 additions & 3 deletions gwas/aou/associatr_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@
import trtools.associaTR

class AssociaTRRunner:
def __init__(self, ptcovar, trvcf, region=None, covars=[]):
def __init__(self, ptcovar, trvcf, beagle, region=None, covars=[]):
self.ptcovar = ptcovar
self.pt_npy = None
self.covar_npy = None
self.trvcf = trvcf
self.region = region
self.covars = covars
self.beagle = beagle
self.gwas = None
self.method = "associaTR"
self.setup()
Expand All @@ -42,7 +43,7 @@ def RunGWAS(self):
same_samples = False
sample_list = None
non_major_cutoff = 20
beagle_dosages = False
#beagle_dosages = False
plotting_phenotype = None
paired_genotype_plot = False
plot_genotype_residuals = False
Expand All @@ -59,7 +60,7 @@ def RunGWAS(self):
sample_list,
self.region,
non_major_cutoff,
beagle_dosages,
self.beagle,
plotting_phenotype,
paired_genotype_plot,
plot_genotype_residuals,
Expand Down