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

methylprep.read_geo exceptions #57

Open
marcmaxson opened this issue Apr 7, 2020 · 0 comments
Open

methylprep.read_geo exceptions #57

marcmaxson opened this issue Apr 7, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@marcmaxson
Copy link
Contributor

  • For files of the <GEO>_signals.txt.gz variety, it won't apply p-value detection to probes if the p-value column is there for each sample.
  • IF meth and unmeth column names differ in case (e.g. SampleA Unmethylated Signal vs samplea Methylated Signal) it wont work. Instead you have to use pandas like this:
>>>import pandas as pd
>>> x = pd.read_csv('GSE67530_signals.txt', sep='\t')
>>> cols = {i:i.title() for i in list(x.columns)}
>>> x = x.rename(columns=cols)
>>> x.to_csv('GSE67530_signals_revised.txt', sep='\t')
>>> z = methylprep.read_geo('GSE67530_signals_revised.txt')
>>> z.to_csv('GSE67530_betas.csv.gz') 

(make samples case insensitive. It's possible to have the function try this trick before failing)

@marcmaxson marcmaxson self-assigned this Apr 7, 2020
@marcmaxson marcmaxson added the enhancement New feature or request label Apr 7, 2020
@marcmaxson marcmaxson removed their assignment Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant