perslab / depict

DEPICT code, instructions and an example
GNU General Public License v3.0
48 stars 23 forks source link

Errors retrieving background loci #16

Open lawchen opened 4 years ago

lawchen commented 4 years ago

I am facing some errors with some of my runs (while some runs with other parameters or GWAS files have been successful). The first error instructs me to remove a folder with the clump results and then re-run DEPICT. I did this but it gave me a python-related error, where 'DataFrame' object has no attribute 'sort'. Please advise me how to resolve this issue.

Below are the stdout of the first and second runs of one configuration file. First run:

Will store result files to /home/lchen/SCRAP/20200131_depict_adhd/4_cohort_adhd2010_0.00001/

Reading GWAS and mapping by chromosome and position to genotype data

Reading precomputed 1KG SNP collection file

Writing DEPICT loci

Retrieving background loci Exiting.. To few background files in /home/lchen/software_test/DEPICT/data/backgrounds/nloci5_nperm500_kb500_rsq0.1_mhc25000000-35000000_colld0.5-collection-1000genomespilot-depict-150429/. Please remove the folder, rerun DEPICT and contact tunepers@broadinstitute.org if the error prevails.

Second run (after removing the said folder):

Will store result files to /home/lchen/SCRAP/20200131_depict_adhd/4_cohort_adhd2010_0.00001/

Reading GWAS and mapping by chromosome and position to genotype data

Reading precomputed 1KG SNP collection file

Writing DEPICT loci

Retrieving background loci Traceback (most recent call last): File "/home/lchen/software_test/DEPICT/src/python/depict.py", line 114, in loci_log = write_depict_loci(analysis_path,label,association_pvalue_cutoff,collection_file,depict_gene_annotation_file,locus_file,mhc_start_bp,mhc_end_bp,plink_executable,genotype_data_plink_prefix,plink_clumping_distance, plink_clumping_r2,"%s_depict.tab"%label,number_random_runs,background_plink_clumping_pvalue,plink_clumping_snp_column_header,association_pvalue_cutoff_column_header,null_gwas_prefix,depict_contact_email,req_fraction_of_background_files,background_loci_dir_suffix,background_data_path) File "/home/lchen/software_test/DEPICT/src/python/depict_library.py", line 309, in write_depict_loci write_background_loci(len(depictloci_df)) File "/home/lchen/software_test/DEPICT/src/python/depict_library.py", line 264, in write_background_loci depictloci_background_df.sort('gwas_pvalue',inplace=True) File "/usr/lib64/python2.7/site-packages/pandas/core/generic.py", line 5067, in getattr return object.getattribute(self, name) AttributeError: 'DataFrame' object has no attribute 'sort'

I sent an email to tunepers@broadinstitute.org but it got bounced...

miaokyle commented 4 years ago

I think the 'sort' function is outdated, you can change the sort function to 'sort_values'.

lawchen commented 4 years ago

Thanks. It's working better with 'sort_values'. DEPICT still seems to not give results if there are too few SNPs or too many. However, how few is too few and how many is too many? Is that an analysis calculation limitation or the program's limitation?

baihongguo commented 1 month ago

Hi, I have the same error. Is this issue resolved?