Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~7K People Reached
Favorite Tags
Member Avatar for sofia85

Hi, I have a big text file (2 GB) with 4 columns looking like this: C START END A 1 10583 10583 0.14 1 10611 10611 0.02 1 13302 13302 0.11 I also have another file where I have extracted a string of information and if this string matches col1:col2:col3 …

Member Avatar for macanohost
0
181
Member Avatar for sofia85

Hi all, I have a data set consisting of mutations that are either deleterious or nonharmful, and from each instance I have calculate a p-value through some empirical distribution. I was wondering if it is possible for me to plot my p-values in an AUC or do I need some …

0
58
Member Avatar for sofia85

Hi, I'm pretty new with the R language. I'm just trying to get familiar with R and wrote a script in gedit (should I use emacs instead?), [CODE] x <- [10.4 5.6 3.1 6.4 21.7] y <- [12,5.6, 7.2, 1.0, 9.3] plot(x,y) [/CODE] then I went to the command window …

Member Avatar for TrustyTony
0
91
Member Avatar for sofia85

Hi, I have python script where I've extracted many p-values. The next step is to calculate the ROC-curve, or i.e. the AUC (the area under the curve), for these p-values. I'm not excactly sure on how to calculate the ROC (e.g. exactly what it takes as input) and I'm also …

0
73
Member Avatar for sofia85

Hi, I need some help getting the hypergeom distr. I've started with this code, but it doesn't seem work: [CODE]def logchoose(n, k): lgn = special.gammaln(n+1) lgk = special.gammaln(k+1) lgnk = special.gammaln(n-k+1) return lgn - (lgnk + lgk) def hypgeo(x, r, b, n): return exp(logchoose(r, x) + logchoose(b, n-x) - logchoose(r+b, …

Member Avatar for Gribouillis
0
102
Member Avatar for sofia85

Hi, I need to extract some info from a file. This is two rows from what the file looks like: prob=0.0093;ID=RGT430;BQRS=491;BRZ=-4.263;ID2=RT914;DRT=0.00;HRun=0;HaplotypeScore=0.2794; prob=0.003;ID=RGR301;BQRS=4;BRZ=-3.261;ID2=EV913;DRT=0.00;HRun=0;HaplotypeScore=0.2654; ....etcetc until last row: prob=0.345. I want to extract prob from each row in the file and put it in a new file, but I don't know how …

Member Avatar for sofia85
0
132
Member Avatar for sofia85

Hi, I have a large file (11 GB), that I want to extract information from. I decided that the file was to big to work with, so I ended up with splitting it into 20 smaller files. Now I don't know what the smartest thing is to do with these …

Member Avatar for sofia85
0
144
Member Avatar for sofia85

Hi, I have a file containing one column with values: 3.258 1.345 5.769 1.00 etc... I want to sort this data. I tried to use sort() directly on my raw data but I get error message saying 'str' object has no attribute 'sort'. I now it's basic, but I'm a …

Member Avatar for sofia85
0
127
Member Avatar for sofia85

Hi, I have this data set consisting of some values for which I want to get the distribution for through random sampling. How would could I do that in Python. I'm new to Python and don't know where to start. Is there a python package that could do this, i.e. …

Member Avatar for Gribouillis
0
101
Member Avatar for sofia85

Hi,I was wondering how to read and write strings in python. I have this code where I'm creating a path, but its a string, and now I want to write to this string. But keep getting this error message [I]AttributeError: 'str' object has no attribute 'write'[/I] I was thinking about …

Member Avatar for Gribouillis
0
233
Member Avatar for sofia85

Hi, I have written a program that searches through a text file and in the end I want it to give me some probabilities. In my program I'm searching (for each line) for certain characters and if that character exists then extract the probability. The thing is that sometimes this …

Member Avatar for Gribouillis
0
137
Member Avatar for sofia85

Hi, I'm trying to create a new file. In this file I want to add some results I have received from my code. Unfortunately I get a error message saying I can't combine str with list. So then I tried to make a string out of the list and ended …

Member Avatar for sofia85
0
95
Member Avatar for sofia85

Hi, I want to create a matrix containing 20 rows and 2 cols. I know how to do this, but I have these two files; number and amount (each file contains 1 col and 20 rows) and I don't know how to add these files into this matrix that I'm …

Member Avatar for Gribouillis
0
152
Member Avatar for sofia85

Hi, I'm trying to execute an if loop inside a program to extract some values. But I only want to extract them if the following is true, [CODE]if ((letter in lines) == (letters in data)) and ((nr in lines) == (nr in data)) dt = a*c outfile.write(dt + '\n') elif …

Member Avatar for woooee
0
94
Member Avatar for sofia85

Hi, I'm trying to add new information, with several if loops, to a new file with append.() but I'm not sure that this works. The new file will also include some data from the f_file, that is why the if loops are there. [CODE]f=open('filename', 'r') new=open('filename', 'w') for data in …

Member Avatar for sofia85
0
103
Member Avatar for sofia85

Im a beginner at Python and I have written a program consisting of three functions and now Im stuck when I need to 'call' on them at the bottom of the program. In the 1st and 2nd functions I get some information and saving it to a file, but the …

Member Avatar for Gribouillis
0
123
Member Avatar for sofia85

I'm a beginner at python programming and now I want to try to write a function consisting of my already written programs. The goal is to get all probabilities when I'm calling on the function in the main program. My already separately written programs looks something likes this and the …

Member Avatar for Gribouillis
0
190
Member Avatar for sofia85

Hi, I don't understand how to write unix shell commands in python. I have this txt file were I want to delete duplicates. It looks something like this: RTGR.txt FRTO.txt RTGR.txt SDOP.txt QWJL.txt SDOP.txt FRTO.txt FRTO.txt ...etcetc... I think I'm suppose to import os and then I want to use …

Member Avatar for sofia85
0
136
Member Avatar for sofia85

Hi, I'm a beginner at python and I'm trying to extract a specific column from a txt file. In the file I want to extract the entire column pph2_prob (i.e. column 16). But I want to get all the values from that column without the headline pph2_prob. How do I …

Member Avatar for JoshuaBurleson
0
4K