JonnyTran / OpenOmics

A bioinformatics API to interface with public multi-omics bio databases for wicked fast data integration.
https://openomics.readthedocs.io/en/latest/
MIT License
31 stars 13 forks source link

Reviewer 1 - errors using the example code #160

Closed ksielemann closed 3 years ago

ksielemann commented 3 years ago

Description

The following code was available in an earlier version of the README (now https://openomics.readthedocs.io/en/latest/) and contained a few incorrect points:

'# Load each expression dataframe': additional ')' in lines should be removed! as current form results in an error

mRNA = MessengerRNA(data=folder_path+"LUAD__geneExp.txt", transpose=True, usecols="GeneSymbol|TCGA", gene_index="GeneSymbol", gene_level="gene_name") Results in warnings (only in first time use): '/homes/.local/lib/python3.7/site-packages/openomics/transcriptomics.py:95: FutureWarning: read_table is deprecated, use read_csv instead. /homes/.local/lib/python3.7/site-packages/openomics/transcriptomics.py:95: ParserWarning: Falling back to the 'python' engine because the 'c' engine does not support sep=None with delim_whitespace=False; you can avoid this warning by specifying engine='python'.'

som = SomaticMutation(data=folder_path+"LUAD__somaticMutation_geneLevel.txt", transpose=True, usecols="GeneSymbol|TCGA", gene_index="gene_name") Results in: 'KeyError: 'gene_name''. This should probably be 'gene_index="GeneSymbol"'.

luad_data.add_clinical_data(clinical_data=folder_path+"nationwidechildrens.org_clinical_patient_luad.txt") Results in warning: '/homes/.local/lib/python3.7/site-packages/openomics/clinical.py:51: FutureWarning: read_table is deprecated, use read_csv instead, passing sep='\t'.'

gencode = GENCODE(path="ftp://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_32/",file_resources={"long_noncoding_RNAs.gtf": "gencode.v32.long_noncoding_RNAs.gtf.gz","basic.annotation.gtf": "gencode.v32.basic.annotation.gtf.gz","lncRNA_transcripts.fa": "gencode.v32.lncRNA_transcripts.fa.gz","transcripts.fa": "gencode.v32.transcripts.fa.gz"},remove_version_num=True,npartitions=5) Results in: _'AttributeError: 'io.TextIOWrapper' object has no attribute 'startswith''.

ksielemann commented 3 years ago

This works now too by the way. I just added this as separate issue so that all my reviewer comments are addressed.