User: josephmccarter1

Reputation:
70
Status:
Trusted
Location:
Italy
Last seen:
3 years, 1 month ago
Joined:
4 years, 8 months ago
Email:
j**************@gmail.com

Posts by josephmccarter1

<prev • 12 results • page 1 of 2 • next >
1
vote
3
answers
2.3k
views
3
answers
Comment: C: Sum column until a certain value is reached then print that line
... Thank you John - yeah what I done was replaced `counter = 0` at the bottom of the script with `break` and that worked. ...
written 3.3 years ago by josephmccarter170
0
votes
3
answers
2.3k
views
3
answers
Comment: C: Sum column until a certain value is reached then print that line
... Thank you - The script is working nicely! One thing however, is that once it reaches the 127770 value it continues counting again and finds the next set of intervals that are separated by a value of 127770. e.g eb2.3chr8,41827920,41827930,319.36 <- my line of interest eb2.3chr8,4183386 ...
written 3.3 years ago by josephmccarter170
1
vote
3
answers
2.3k
views
3
answers
Comment: C: Sum column until a certain value is reached then print that line
... Yes - I did try hack it and I also changed the format of the file.bedgraph a little. Above is the code I used and the output from that code. and first 11 lines file.bedgraph is also on display ...
written 3.3 years ago by josephmccarter170
1
vote
3
answers
2.3k
views
3
answers
Comment: C: Sum column until a certain value is reached then print that line
... file.bedgraph Chr,Start,End,Value eb2.3chr8,41806600,41806660,-4.98 eb2.3chr8,41806660,41806670,-0.13 eb2.3chr8,41806670,41806700,5.57 eb2.3chr8,41806700,41806720,10.42 eb2.3chr8,41806720,41806730,5.57 eb2.3chr8,41806730,41806750,11.28 eb2.3chr8,41806750,4180 ...
written 3.3 years ago by josephmccarter170
0
votes
3
answers
2.3k
views
3
answers
Comment: C: Sum column until a certain value is reached then print that line
... with open('/file.bedgraph') as whatever: counter = 0 next(whatever) for line in whatever: Chr, Start, End, Value = line.split("\t") # \t is for tab. counter += int(Value) # int() to turn the text of value into an actual number. if counter > 127770: ...
written 3.3 years ago by josephmccarter170
1
vote
3
answers
2.3k
views
3
answers
Comment: C: Sum column until a certain value is reached then print that line
... I have very little python experience but I decided to give this approach a go. I am getting numerous errors "ValueError: too many values to unpack" "ValueError: invalid literal for int() with base 10: 'Value\t\n'" When i look at "whatever" , the "Chr, Start, End, Value" seems to be in as "nan" Do ...
written 3.3 years ago by josephmccarter170
0
votes
1
answer
1.2k
views
1
answers
Comment: C: How do I replace a value used in script with a range of values in a file?
... You are right - I feel I am pushing the limits of awk and its probably time to move over to python. My apologies for not being more clear. The example I had shown wasn't very well put together. I am basically obtaining "median" values over large peak domains in ChIP-seq with the intention to show mo ...
written 3.3 years ago by josephmccarter170
3
votes
1
answer
1.2k
views
1
answer
How do I replace a value used in script with a range of values in a file?
... I recently enquired about an [AWK script][1] to keep summing a column until it reaches a certain value then print that line. The Awk script I got from [Alex Reynolds][2] was very hepful and is show below $ awk '\ BEGIN { \ s = 0; \ } \ { \ s += $4; \ if (s ...
bioinformatics awk bedgraph written 3.3 years ago by josephmccarter170 • updated 3.3 years ago by tomc80
13
votes
3
answers
2.3k
views
3
answers
Sum column until a certain value is reached then print that line
... Hi All, I have a bedgraph file with 4 columns - Chr, Start, End, Value. I want to go through the 4th column and sum each row in that column until I have reached a certain value then print that row. so for instance - Sum column until you a reached a value of 100 then print that entire line I have ...
bioinformatics awk bedgraph written 3.4 years ago by josephmccarter170 • updated 3.4 years ago by John12k
0
votes
0
answers
3.3k
views
0
answers
Comment: A: bigWigtoBedGraph - Command will not run
... Not to worry - got it sorted!   Rookie mistake - grabbed the wrong file!     ...
written 4.7 years ago by josephmccarter170

Latest awards to josephmccarter1

No awards yet. Soon to come :-)

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1191 users visited in the last hour