Give an example of gene list?
Closed this issue · 1 comments
dietmarfdz commented
I am trying to provide a gene list but I am getting the following error:
./PrediXcan.py --predict --weights weights/gtex_v7_Whole_Blood_imputed_europeans_tw_0.5_signif.db --dosages genotype --samples samples.txt --genelist gene_inv8.txt --output_prefix output/inv8_001
2019-01-11 17:42:01.299286 Preloading weights...
2019-01-11 17:42:02.075148 Processing chr8.dosage.txt.gz
Traceback (most recent call last):
File ".../PrediXcan.py", line 230, in <module>
main()
File ".../PrediXcan.py", line 211, in main
transcription_matrix.update(gene, weight, ref_allele, allele, dosage_row)
File "...PrediXcan.py", line 99, in update
self.gene_list = self.get_gene_list()
File ".../PrediXcan.py", line 93, in get_gene_list
return list(sorted([line.strip().split()[-1] for line in open(self.gene_file)]))
IndexError: list index out of range
I am not sure about the error as I am putting the following gene list (2 examples tried):
chr8 ENSG00000227203.3
...
8 ENSG00000227203.3
...
and none of them worked.
Maybe if you put an example of a gene list I could get an idea?
I obtained the Ensembl_id_version name by using biomart.
Heroico commented
Hi there,
Can you post the complete gene list file you are providing? I suspect there might be a malformed line. (i.e. an empty line at the end).
I created a sampel gene list file with a single line and it worked with the example.
./PrediXcan.py --predict --assoc --linear \
> --weights weights/TW_Cells_EBV-transformed_lymphocytes_0.5.db \
> --dosages genotype \
> --samples samples.txt \
> --pheno phenotype/igrowth.txt \
> --output_prefix results/Cells_EBV-transformed_lymphocytes \
> --genelist gene_list.txt
Gene list file:
chr8 ENSG00000227203.3