Spaces:
Sleeping
Sleeping
look up genes by gene_id
Browse files
app.py
CHANGED
@@ -11,6 +11,7 @@ st.markdown("""
|
|
11 |
**CryptoCEN** is a co-expression network for *Cryptococcus neoformans* built on 1,524 RNA-seq runs across 34 studies.
|
12 |
A pair of genes are said to be co-expressed when their expression is correlated across different conditions and
|
13 |
is often a marker for genes to be involved in similar processes.
|
|
|
14 |
To Cite:
|
15 |
MJ O'Meara, JR Rapala, CB Nichols, C Alexandre, B Billmyre, JL Steenwyk, A Alspaugh,
|
16 |
TR O'Meara CryptoCEN: A Co-Expression Network for Cryptococcus neoformans reveals
|
@@ -22,6 +23,11 @@ novel proteins involved in DNA damage repair
|
|
22 |
Put in the ``CNAG_#####`` gene_id for two genes.
|
23 |
""")
|
24 |
|
|
|
|
|
|
|
|
|
|
|
25 |
estimated_expression_meta = datasets.load_dataset(
|
26 |
path = "maomlab/CryptoCEN",
|
27 |
data_files = {"estimated_expression_meta": "Data/estimated_expression_meta.tsv"})
|
@@ -32,6 +38,12 @@ estimated_expression = datasets.load_dataset(
|
|
32 |
data_files = {"estimated_expression": "estimated_expression.tsv"})
|
33 |
estimated_expression = estimated_expression["estimated_expression"].to_pandas()
|
34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
col1, col2, col3 = st.columns(spec = [0.2, 0.2, 0.6])
|
36 |
with col1:
|
37 |
gene_id_1 = st.text_input(
|
@@ -40,6 +52,7 @@ with col1:
|
|
40 |
max_chars = 10,
|
41 |
help = "CNAG Gene ID e.g. CNAG_04365")
|
42 |
|
|
|
43 |
with col2:
|
44 |
gene_id_2 = st.text_input(
|
45 |
label = "Gene ID 2",
|
@@ -48,8 +61,8 @@ with col2:
|
|
48 |
help = "CNAG Gene ID e.g. CNAG_04222")
|
49 |
|
50 |
chart_data = pd.DataFrame({
|
51 |
-
"expression_1": np.log10(estimated_expression.loc[
|
52 |
-
"expression_2": np.log10(estimated_expression.loc[
|
53 |
"run_accession": estimated_expression.columns,
|
54 |
"run_accession_meta": estimated_expression_meta["run_accession"],
|
55 |
"study_accession": estimated_expression_meta["study_accession"]})
|
|
|
11 |
**CryptoCEN** is a co-expression network for *Cryptococcus neoformans* built on 1,524 RNA-seq runs across 34 studies.
|
12 |
A pair of genes are said to be co-expressed when their expression is correlated across different conditions and
|
13 |
is often a marker for genes to be involved in similar processes.
|
14 |
+
|
15 |
To Cite:
|
16 |
MJ O'Meara, JR Rapala, CB Nichols, C Alexandre, B Billmyre, JL Steenwyk, A Alspaugh,
|
17 |
TR O'Meara CryptoCEN: A Co-Expression Network for Cryptococcus neoformans reveals
|
|
|
23 |
Put in the ``CNAG_#####`` gene_id for two genes.
|
24 |
""")
|
25 |
|
26 |
+
h99_transcript_annotations = datasets.load_dataset(
|
27 |
+
path = "maomlab/CryptoCEN",
|
28 |
+
data_files = {"h99_transcript_annotations": "h99_transcript_annotations.tsv"})
|
29 |
+
h99_transcript_annotations = h99_transcript_annotations["h99_transcript_annotations"].to_pandas()
|
30 |
+
|
31 |
estimated_expression_meta = datasets.load_dataset(
|
32 |
path = "maomlab/CryptoCEN",
|
33 |
data_files = {"estimated_expression_meta": "Data/estimated_expression_meta.tsv"})
|
|
|
38 |
data_files = {"estimated_expression": "estimated_expression.tsv"})
|
39 |
estimated_expression = estimated_expression["estimated_expression"].to_pandas()
|
40 |
|
41 |
+
print(f"estimated_expression shape: {estimated_expression.shape}")
|
42 |
+
|
43 |
+
print(f"transcript_annotations are equal: {sum(h99_transcript_annotations['cnag_id'] == estimated_expression.index)}")
|
44 |
+
|
45 |
+
|
46 |
+
|
47 |
col1, col2, col3 = st.columns(spec = [0.2, 0.2, 0.6])
|
48 |
with col1:
|
49 |
gene_id_1 = st.text_input(
|
|
|
52 |
max_chars = 10,
|
53 |
help = "CNAG Gene ID e.g. CNAG_04365")
|
54 |
|
55 |
+
|
56 |
with col2:
|
57 |
gene_id_2 = st.text_input(
|
58 |
label = "Gene ID 2",
|
|
|
61 |
help = "CNAG Gene ID e.g. CNAG_04222")
|
62 |
|
63 |
chart_data = pd.DataFrame({
|
64 |
+
"expression_1": np.log10(estimated_expression.loc[h99_transcript_annotations["gene_id"] == gene_id_1].to_numpy()[0] + 1),
|
65 |
+
"expression_2": np.log10(estimated_expression.loc[h99_transcript_annotations["gene_id"] == gene_id_2].to_numpy()[0] + 1),
|
66 |
"run_accession": estimated_expression.columns,
|
67 |
"run_accession_meta": estimated_expression_meta["run_accession"],
|
68 |
"study_accession": estimated_expression_meta["study_accession"]})
|