Giter Site home page Giter Site logo

Comments (3)

Yangxiaohan0120 avatar Yangxiaohan0120 commented on July 22, 2024

"def main():
parser = argparse.ArgumentParser(description='tensorQTL: GPU-based QTL mapper')
parser.add_argument('genotype_path', help='Genotypes in PLINK format')
parser.add_argument('phenotype_bed', help='Phenotypes in BED format')
parser.add_argument('prefix', help='Prefix for output file names')
parser.add_argument('--mode', default='cis', choices=['cis', 'cis_nominal', 'cis_independent', 'trans'], help='Mapping mode. Default: cis')
parser.add_argument('--covariates', default=None, help='Covariates file, tab-delimited, covariates x samples')
parser.add_argument('--permutations', type=int, default=10000, help='Number of permutations. Default: 10000')
parser.add_argument('--interaction', default=None, type=str, help='Interaction term')
parser.add_argument('--cis_output', default=None, type=str, help="Output from 'cis' mode with q-values. Required for independent cis-QTL mapping.")
parser.add_argument('--phenotype_groups', default=None, type=str, help='Phenotype groups. Header-less TSV with two columns: phenotype_id, group_id')
parser.add_argument('--window', default=1000000, type=np.int32, help='Cis-window size, in bases. Default: 1000000.')
parser.add_argument('--pval_threshold', default=None, type=np.float64, help='Output only significant phenotype-variant pairs with a p-value below threshold. Default: 1e-5 for trans-QTL')
parser.add_argument('--maf_threshold', default=0, type=np.float64, help='Include only genotypes with minor allele frequency >= maf_threshold. Default: 0')
parser.add_argument('--maf_threshold_interaction', default=0.05, type=np.float64, help='MAF threshold for interactions, applied to lower and upper half of samples')
parser.add_argument('--return_dense', action='store_true', help='Return dense output for trans-QTL.')
parser.add_argument('--return_r2', action='store_true', help='Return r2 (only for sparse trans-QTL output)')
parser.add_argument('--best_only', action='store_true', help='Only write lead association for each phenotype (interaction mode only)')
parser.add_argument('--output_text', action='store_true', help='Write output in txt.gz format instead of parquet (trans-QTL mode only)')
parser.add_argument('--batch_size', type=int, default=20000, help='Batch size. Reduce this if encountering OOM errors.')
parser.add_argument('--load_split', action='store_true', help='Load genotypes into memory separately for each chromosome.')
parser.add_argument('--fdr', default=0.05, type=np.float64, help='FDR for cis-QTLs')
parser.add_argument('--qvalue_lambda', default=None, type=np.float64, help='lambda parameter for pi0est in qvalue.')
parser.add_argument('--seed', default=None, type=int, help='Seed for permutations.')
parser.add_argument('-o', '--output_dir', default='.', help='Output directory')
args = parser.parse_args()"

In the source code at the directory ./tensorqtl/tensorqtl.py, you can see one important argument "--window" which you can change your detection region from default 1000000 to any region you want. Hope it's useful.

from tensorqtl.

elodiepersyn avatar elodiepersyn commented on July 22, 2024

Hi,
I am using the 1Mb window. But I get few SNPs with a tss_distance higher than 1Mb. I am using the following command:
cisnom_df = cis.map_nominal(genotype_df, variant_df, phenotype_df, phenotype_pos_df, cisnom_df_outprefix, covariates_df, window=1000000, maf_threshold=0.005)
I get for example:
phenotype_id,variant_id,tss_distance,af,ma_samples,ma_count,pval_nominal,slope,slope_se ENSG00000028137,rs587669835,1096141,0.994172,53,56,0.3039955479904355,0.046624605,0.045353957
I don't understand why I get this kind of results by setting the window=1Mb.

from tensorqtl.

francois-a avatar francois-a commented on July 22, 2024

Hi, could you please provide an example dataset that reproduces this issue?

from tensorqtl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.