Hi all,
I wrote a script that basically finds a "start" coordinate in File 1, goes to the correct position in file 2 (then either jumps forward 1 or 2 positions), then counts the number of positions (in groups of 3) until either TAG, TAA or TGA are located; the number of positions are recorded...
Hi all, it has been a long while since I have needed to do any Perl coding! How easy is the following to do? For once I have a good idea what I need to do (makes a change), but this time I have forgotten HOW to do it.
File 1 (csv file), for each line: store the number in column 4 (lets call it...
Hi all,
I ran into a huge problem with my work today and think a Perl script will fix it and hopefully save me weeks of tedious work (and needless to say get the boss off my back!). Basically I am stuck comparing two files.
The first has two columns that look like:
3254 5041
8277 9047
9052...
Hi everyone. I need help again! Basically I have DNA repeats in a csv file with some other information in adjacent columns.
The repeats can be anything like (always in the first column):
AT|AT|AT|AT (4)
ATTA|ATTA|ATTA|ATTA (4)
A|A|A|A|A|A (6) etc....
What I need to do is to output a new column...
I need to make a regular expression to match the first two characters and the last two characters of a string. The characters can be anything from A-Z and the string can be of any length.
For example:
ATCGTACGAT > I would keep
ATATCTTT > Would be discarded
Is this even possible with a regular...
Hi everyone. So I am completely stuck. Basically I have a csv file with data like:
First column
AAAAAA more data in adjacent columns <keep
ATATAT more data in adjacent columns <keep
AATAAT more data in adjacent columns <keep
I want to delete any line that has three...
Hi have this script:
use strict;
use warnings;
use Text::CSV_XS;
my $len = shift;
my $csv = Text::CSV_XS->new();
while (<>) {
$csv->parse($_);
my ($string, $num, $num2) = $csv->fields();
print "$string,$num,$num2\n" if (length($string) >= $len);
}
Basically it reads a list of data in...
Basically I read two files into a script:
The big file has "big" values like -
100 1000
1200 1600
1700 2050 ...
The small file with values like-
5 15
120 125
I wrote a script which finds any small value located within the big values...then for any match it is supposed to output all the values...
It has been a while since I have coded anything and I need help. I always seem to find the answers here, and you are all much more skilled than I am!
So I have a file that has a list of numbers like so (in csv format):
2923044 2924240
2926739 2928907
2935683 2936888
2939169 2940560
2941959...
My code is below...it reads in two files, it compares the values in these files and outputs a new file where the new values are stored. However everytime I need it i have to change the file name each time, so basically I read in
INPUT 1 - EN638_CDS_LOCATION.xls (stays the same each time)...
Ok so I have a list like so (obviously A LOT longer and in CSV format):
The character and number fields are in separate cells.
AAAAAAAAAA 38058
CTCTCTCT 38193
CAGCAGCAGCAGCAG 38622
TTTTTT 38871
TTTTTT 39294
TTTTTT 39952
TTTTTT 39979
TCTTCTTCTTCT 40787
TTTTTT...
How do i change this script so that it will ask the user what the filename is rather than having to go into the code each time and change the path of the filename?
The code is:
use strict;
use warnings;
open(OUTPUT,"+>insertorganismname_REPEAT_DISTRIBUTION.csv");
open BIG, 'f:\PhD\Data...
So this kind of related to my previous thread where I needed to input two files with lists of numbers. However one of the files is presented like this:
FT repeat_unit 48..57
FT /label= 1
FT repeat_unit 188..194
FT /label= 1
FT repeat_unit...
Hi, its me again :(.
So I have to files. Both have a range of numbers like so (in a list with each number in a separate cell and each pair of numbers on a new line)...
array 1: 0..150, 300..500
array 2: 3..8, 10..20 and so on.
I need a script that will find all the numbers from array 2 in...
I need help.
I have a number of scripts which analyse a file and print the output either onscreen or to an outfile. On a colleagues computer they work as they are designed to. However on my computer none of them work correctly. I get errors such as:
print() on closed filehandle OUT at...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.