Giter Site home page Giter Site logo

Comments (6)

Ruby-1869 avatar Ruby-1869 commented on July 3, 2024

Anyone can help?

from tensorqtl.

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

Hi,
Can you please provide a more specific, reproducible example? I don't see this error when running the example notebook.

from tensorqtl.

Ruby-1869 avatar Ruby-1869 commented on July 3, 2024

from tensorqtl.

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

Can you please post the scripts in the issue here on GitHub? email attachments don't work for these.

from tensorqtl.

Ruby-1869 avatar Ruby-1869 commented on July 3, 2024

Sorry.
This is the run_tensorQTL_cis_empirical.sh script.

#!/bin/bash


#SBATCH -c 4
#SBATCH --gres=gpu:1              # Number of GPUs (per node)
#SBATCH -p gpu
#SBATCH --mem=50G               # memory (per node)
#SBATCH --time=48:00:00


#activate conda environment which installed the tensorQTL
source activate tensorQTL_new

WKDIR=${SLURM_SUBMIT_DIR}/GEUVADIS.445  

python ${SLURM_SUBMIT_DIR}/tensorQTL_cis_empirical.py ${WKDIR} 

And this is the tensorQTL_cis_empirical.py script.

#!/usr/bin/env python


import os, glob, sys
import pandas as pd
from logging import debug, warning, error, getLogger
from optparse import OptionParser
import numpy as np
import tensorqtl
from tensorqtl import genotypeio, cis, trans
import matplotlib.pyplot as plt

#Variables
wk_dir=sys.argv[1]


# path to data
plink_prefix_path = '%s/GEUVADIS.445_samples.GRCh38.20170504.maf01.filtered' % (wk_dir)
expression_bed = '%s/GEUVADIS.445_samples.expression.bed.gz' % (wk_dir)
covariates_file = '%s/GEUVADIS.445_samples.covariates.txt' % (wk_dir)
prefix =  '%s/GEUVADIS.445_samples' % (wk_dir)



# load phenotypes and covariates
phenotype_df, phenotype_pos_df = tensorqtl.read_phenotype_bed(expression_bed)
covariates_df = pd.read_csv(covariates_file, sep='\t', index_col=0).T


# PLINK reader for genotypes
pr = genotypeio.PlinkReader(plink_prefix_path)
genotype_df = pr.load_genotypes()
variant_df = pr.bim.set_index('snp')[['chrom', 'pos']]


# cis_empirical
cis_df = cis.map_cis(genotype_df, variant_df, phenotype_df, phenotype_pos_df, covariates_df, nperm=100, seed = 1234)

Thanks.

from tensorqtl.

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

This script runs fine on my end. I suspect it might be the input files -- can you please download the files from the example notebook again? The PLINK files should end with .filtered.nodup.*. And please make sure to run the latest version of tensorQTL.

Here's the output you should see:

cis-QTL mapping: empirical p-values for phenotypes
  * 445 samples
  * 19836 phenotypes
  * 26 covariates
  * 13369268 variants
  * using seed 1234
  * checking phenotypes: 19836/19836
    ** dropping 38 phenotypes without variants in cis-window
  * computing permutations
    processing phenotype 19798/19798
  Time elapsed: 5.33 min
done.

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.