Skip to content

Commit

Permalink
Fixed bug with reading ensembl files
Browse files Browse the repository at this point in the history
  • Loading branch information
kataikko committed Oct 19, 2023
1 parent ec21191 commit 74d4451
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 0 additions & 2 deletions db/Docs.md → db/code_documentation.md
Original file line number Diff line number Diff line change
@@ -209,11 +209,9 @@ Checks if files are in the ```source/processed/``` directory.
- motif.csv
- distance.csv
- mode = 1:
- gene_gene_scores_mouse.csv
- genes_annotated_mouse.csv
- protein_protein_scores_mouse.csv
- proteins_annotated_mouse.csv
- gene_gene_scores_human.csv
- genes_annotated_human.csv
- protein_protein_scores_human.csv
- proteins_annotated_human.csv
4 changes: 2 additions & 2 deletions db/scripts/main.py
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@
os.environ["_TIME_FUNCTIONS"] = str(False)
os.environ["_SILENT"] = str(False)
os.environ["_PRODUCTION"] = str(True)
os.environ["_ACCESS_NEO4J"] = str(True)
os.environ["_ACCESS_NEO4J"] = str(False)


@time_function
@@ -257,6 +257,6 @@ def upload_workflow():


if __name__ == "__main__":
# upload_workflow()
upload_workflow()
# run_queries()
pass
6 changes: 5 additions & 1 deletion db/scripts/read/read_ensembl.py
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ def parse_ensembl(dir_path: str = os.getenv("_DEFAULT_ENSEMBL_PATH")):
- Mus_musculus.GRCm39.109.refseq.tsv
- Mus_musculus.GRCm39.109.uniprot.tsv
- TFCheckpoint_download_180515.tsv
- lost_correlations_symbols
- lost_correlations_symbols.csv
- Homo_sapiens.GRCh38.110.entrez.tsv
- Homo_sapiens.GRCh38.110.ena.tsv
- Homo_sapiens.GRCh38.110.refseq.tsv
@@ -43,6 +43,10 @@ def read_ensembl():
df, index = _reformat_ensembl_term_file(
df=pd.read_csv(file, sep="\t"), file_name=file_name.split("/")[-1]
)
elif file_extention == ".csv":
df, index = _reformat_ensembl_term_file(
df=pd.read_csv(file, sep=","), file_name=file_name.split("/")[-1]
)
dataframes[index] = df
return dataframes

0 comments on commit 74d4451

Please sign in to comment.