Giter Site home page Giter Site logo

Comments (10)

fizzo13 avatar fizzo13 commented on September 17, 2024 1

Hi Sunny, thank you for using GoTChA. Can you try replacing the column name from 'X' to "WhiteListMatch"?
Tagging @SanjayKottapalli for help with the python module.

from gotcha.

Selecton98 avatar Selecton98 commented on September 17, 2024 1

@SanjayKottapalli
@fizzo13
Hi everyone,
I finally get this bug solved.

One problem is the R "GotchaLabeling" doesn't need a "sample_column" information which is required by the python "GotchaLabeling" and "read_data". So I manually defined "sample_column='Sample'" in each of these two functions.

Another problem is the csv file should include an index column and a "WhiteListMatch" column. Both of these two columns should be index/barcode information.

Thank you,
Sunny

from gotcha.

Selecton98 avatar Selecton98 commented on September 17, 2024

Hi Sunny, thank you for using GoTChA. Can you try replacing the column name from 'X' to "WhiteListMatch"? Tagging @SanjayKottapalli for help with the python module.

Hello! Thank you for the reply. I tried to change 'X' to 'WhiteListMatch' in the list but it didn't help.
@SanjayKottapalli

from gotcha.

SanjayKottapalli avatar SanjayKottapalli commented on September 17, 2024

Hi Sunny, I think the issue is actually with the "gene_id" and "sample_id" parameters that you set. Can you show me exactly how your own input .csv file looks?

from gotcha.

Selecton98 avatar Selecton98 commented on September 17, 2024

Genemeta.csv
@SanjayKottapalli
Please find my file in the attachment. I used "RM30" to make this column same as your demo (for easier debugging).
Thank you for your help!

from gotcha.

SanjayKottapalli avatar SanjayKottapalli commented on September 17, 2024

Hmm, I tried to read the file in python and it worked just fine for me. Can you try the following?

In an interactive python session:

  1. Navigate to the folder where you installed Gotcha, then cd into inst/python
  2. import gotcha_labeling
  3. test = gotcha_labeling.read_data("/lab-share/Public/data/DNV/barcode3/Genemeta.csv", "Gene", "RM30")
  4. print(test)

Let me know what output this gives and if any errors come up.

from gotcha.

Selecton98 avatar Selecton98 commented on September 17, 2024
image @SanjayKottapalli The files is successfully read by the "gotcha_labeling.read_data".

from gotcha.

fizzo13 avatar fizzo13 commented on September 17, 2024

@Selecton98 was the issue fixed?

from gotcha.

SanjayKottapalli avatar SanjayKottapalli commented on September 17, 2024

Since it seems to be working when using python only and doesn't work when you call python through the R pipeline, it seems like it could be a reticulate issue @fizzo13 . Probably related to formatting of dataframes.

@Selecton98 could you also try commenting/changing this code in your gotcha_labeling.py from

try:
genotyping = pd.DataFrame(index=cell_line.index)
if sample_id in np.unique(cell_line['Sample'].values):
cell_line = cell_line.loc[cell_line['Sample']==sample_id, :]
genotyping['WTcount'] = cell_line[gene_id+'_WTcount']
genotyping['MUTcount'] = cell_line[gene_id+'_MUTcount']
except:
cell_line = cell_line.set_index("WhiteListMatch")
genotyping = pd.DataFrame(index=cell_line.index)
genotyping['WTcount'] = cell_line['WTcount']
genotyping['MUTcount'] = cell_line['MUTcount']

to only what's in the try block?

genotyping = pd.DataFrame(index=cell_line.index)
if sample_id in np.unique(cell_line['Sample'].values):
cell_line = cell_line.loc[cell_line['Sample']==sample_id, :]
genotyping['WTcount'] = cell_line[gene_id+'_WTcount']
genotyping['MUTcount'] = cell_line[gene_id+'_MUTcount']

The error is strange because the try block shouldn't fail to begin with.

from gotcha.

fizzo13 avatar fizzo13 commented on September 17, 2024

Thank you @SanjayKottapalli and @Selecton98 . I'll close the issue.

from gotcha.

Related Issues (8)

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.