Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update heatcluster.py #36

Open
wants to merge 16 commits into
base: v1.1.0.20240131
Choose a base branch
from
Open

Update heatcluster.py #36

wants to merge 16 commits into from

Conversation

DrB-S
Copy link
Owner

@DrB-S DrB-S commented Feb 1, 2024

Removed shape from lines 75 & 76

DrB-S added 16 commits February 1, 2024 09:11
Removed shape from lines 75 & 76
Changed line 77 "if tabs > commas" to "if len(tabs) > len(commas)"
Change line 77 to determine whether comma or tab delimited with "if len(tabs.columns) > len(commas.columns):"
Removed "index_col=False" from lines 79 & 82
Commented out "logging.debug(df.to_string())". df.to_string is not valid in a LazyFrame
Removed check for melted matrix in lines 51-53.
"Dropped" first column by setting row_index_name=None in lines 79 & 82.
Line 102: #df.columns = df.columns.map(str) #df.columns.map doesn't work in Polars, so see it line 112 will work without it
Printing out header in lines 79 & 81 as a check.
Line 112: df.columns = df.columns.replace('|'.join(consensus_patterns), '', regex=True) # changed from df.columns.str.replace
Replaced line 112 with this:  df.columns = list(map(lambda x: x.replace('|'.join(consensus_patterns), '', regex=True), df.columns))
Removed search/replace consensus_patterns in line 113
Removed line 118: #df = df.set_index(df.columns)
Examining unsorted df
Line 165: #df.replace([np.inf, -np.inf], np.nan)
    #df.dropna()
    df.filter(~pl.all_horizontal(pl.all().is_null())).collect() #see if this works to drop rows with all nulls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant