Skip to content

Commit

Permalink
MAINT: update + add context to some old comments
Browse files Browse the repository at this point in the history
These dated back to probably around last November
  • Loading branch information
fedarko committed May 3, 2019
1 parent 01e531b commit a7e7a5a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions rankratioviz/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,16 +353,17 @@ def gen_sample_plot(table, metadata):

# Since we don't bother setting a default log ratio, we set the balance for
# every sample to NaN so that Altair will filter them out (producing an
# empty scatterplot by default, which makes sense).
# empty scatterplot by default, which makes sense). I guess None would
# also work here.
balance = pd.Series(index=table.index).fillna(float("nan"))
df_balance = pd.DataFrame({"rankratioviz_balance": balance})
# At this point, "data" is a DataFrame with its index as sample IDs and
# one column ("balance", which is solely NaNs).
# At this point, df_balance is a DataFrame with its index as sample IDs
# and one column ("rankratioviz_balance", which is solely NaNs).
# We know that df_balance and metadata's indices should match up since we
# already ran matchdf() on the loaded BIOM table and metadata.
sample_metadata = pd.merge(
df_balance, metadata, left_index=True, right_index=True
)
# TODO note dropped samples from this merge (by comparing data with
# metadata and table) and report them to user (#54).

# "Reset the index" -- make the sample IDs a column (on the leftmost side)
# First we rename the index "Sample ID", just on the off chance that
Expand Down

0 comments on commit a7e7a5a

Please sign in to comment.