Giter VIP home page Giter VIP logo

Comments (9)

alexlenail avatar alexlenail commented on July 3, 2024

@iamjli is run_new_garnet.py your code?

from garnet.

natashapm avatar natashapm commented on July 3, 2024

It's my file modified from Divya's code :

from GarNet import *
expression = "./Garnet_input_liver_DEGs.txt"
options = {}
df = "./DNase_output_garnet_genes.txt"
df_reg = TF_regression(df, expression, options)
df_reg.to_csv('./DNase_output_TF_regression.txt', sep='\t', header=True, index=False)

from garnet.

alexlenail avatar alexlenail commented on July 3, 2024

aha!

df = "./DNase_output_garnet_genes.txt"

is you're problem I bet. df stands for dataframe which is different from a filename. You'll need to load the dataframe from the file, probably with a pd.read_csv("./Garnet_input_liver_DEGs.txt")

from garnet.

natashapm avatar natashapm commented on July 3, 2024

Ok, with this code:
df = pd.read_csv("./DNase_output_garnet_genes.txt", sep='\t')

I get this error:
06:55:15 - GarNet: INFO - Performing linear regression on 3 transcription factor expression profiles...
Traceback (most recent call last):
File "run_new_garnet.py", line 19, in
df_reg = TF_regression(df, expression, options)
File "/home/nlpm/.local/lib/python3.6/site-packages/GarNet/garnet.py", line 371, in TF_regression
return imputed_TF_features_dataframes
NameError: name 'imputed_TF_features_dataframes' is not defined

My path is:
/home/nlpm/Jeff_Carroll_Htt_ASO/OmicsIntegrator/results/new_garnet

from garnet.

alexlenail avatar alexlenail commented on July 3, 2024

Hmm. Looks like a typo in the garnet source code. Weird that you're the first to find it.

Try

pip install --user --upgrade garnet

(confirm that it installs version 0.2.21)

And then try this again.

from garnet.

alexlenail avatar alexlenail commented on July 3, 2024

Mmm. You'll need to be in a virtual environment. @iamjli and @divyaramamoorthy can advise you on that (i'll be in soon too), but here are the commands you should be able to run and will work:

From your working directory:

python3 -m venv venv
source venv/bin/activate
pip install garnet

from garnet.

natashapm avatar natashapm commented on July 3, 2024

I got the code to run with the upgraded garnet. It works without a printed error now, but I get a file with only the header and no actual data inside.

from garnet.

alexlenail avatar alexlenail commented on July 3, 2024

That one will be harder to debug from here. I'll be in around noon to help, unless this is urgent and I can come in right now..?

from garnet.

natashapm avatar natashapm commented on July 3, 2024

Not urgent, see you later

from garnet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.