Skip to content

Commit

Permalink
changed eukaryota to homo sapiens.
Browse files Browse the repository at this point in the history
  • Loading branch information
simonleandergrimm committed Feb 15, 2024
1 parent fcc1c0b commit 61d1ccb
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions figures/2024-02-14-larger-fig-1a.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@


target_taxa = {
2759: ("eukaryota", "Eukaryota"),
9606: ("homo sapiens", "Homo Sapiens"),
2: ("bacteria", "Bacteria"),
2157: ("archaea", "Archaea"),
10239: ("viruses", "Viruses"),
Expand Down Expand Up @@ -69,7 +69,7 @@ def shape_boxplot_df(boxplot_df: pd.DataFrame) -> pd.DataFrame:
].melt(
id_vars=["study", "sample"],
value_vars=[
"Eukaryota",
"Homo Sapiens",
"Bacteria",
"Archaea",
"Viruses",
Expand Down Expand Up @@ -172,13 +172,9 @@ def assemble_plotting_dfs() -> tuple[pd.DataFrame, pd.DataFrame]:
taxid = int(line_taxid)
clade_assignments = int(clade_assignments)
if taxid in target_taxa:
#print(line)
#print(line_taxid, clade_assignments)
#print(target_taxa[taxid][1])
relative_abundance = (
clade_assignments / metadata_samples[sample]["reads"]
)

taxa_abundances[
target_taxa[taxid][1]
] += relative_abundance
Expand All @@ -190,7 +186,6 @@ def assemble_plotting_dfs() -> tuple[pd.DataFrame, pd.DataFrame]:
**taxa_abundances,
}
)
#print(box_plot_data)
boxplot_df = pd.DataFrame(box_plot_data)
boxplot_df = shape_boxplot_df(boxplot_df)
study_nucleic_acid_mapping = get_study_nucleic_acid_mapping()
Expand Down

0 comments on commit 61d1ccb

Please sign in to comment.