Comments (10)
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.
@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.
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.
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.
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.
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:
- Navigate to the folder where you installed Gotcha, then cd into inst/python
import gotcha_labeling
test = gotcha_labeling.read_data("/lab-share/Public/data/DNV/barcode3/Genemeta.csv", "Gene", "RM30")
print(test)
Let me know what output this gives and if any errors come up.
from gotcha.
from gotcha.
@Selecton98 was the issue fixed?
from gotcha.
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.
Thank you @SanjayKottapalli and @Selecton98 . I'll close the issue.
from gotcha.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gotcha.