473,327 Members | 2,065 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

split up FASTA into array....perl...any suggestions please?

Okay,ive been working on this for a long time now and i cant seem to figure a way to make this code work.

I simply need to split a FASTA file that has no spaces into one with spoaces so i can input it into an array where i can read each character individually. I also have to shuffle the array but i cant even shuffle if i cant split the .txt file which contains the FASTA sequence.

Am i overlooking some small error here or is this just impossible?Below is where is a snippet of where i think the error is. thanks.

[CODE:
open (FILE, "sequencetoo.txt");
$data_file = "sequencetoo.txt";

open(FILE,$data_file);

$oldSequence = <FILE>;
chomp ($oldSequence);

@newSequence = split(//, $oldSequence);
close (FILE);

.....END CODE]
Mar 29 '10 #1
0 1454

Sign in to post your reply or Sign up for a free account.

Similar topics

26
by: Chris Lasher | last post by:
Hello, I have a rather large (100+ MB) FASTA file from which I need to access records in a random order. The FASTA format is a standard format for storing molecular biological sequences. Each...
2
by: SL_McManus | last post by:
Hi All; I am fairly new to Perl. I have a file with close to 3000 lines that I would like to split out in a certain way. I would like to put the record type starting in column 1 for 2 spaces,...
3
by: rxl124 | last post by:
Hi, room Beginner of learning perl here!! I have question to all, I have below file name datebook.master which contains only 2 lines Mike wolf:12/3/44:144 park ave, paramus: 44000 Sarah kim:...
8
by: uc_sk | last post by:
Hello All I am a newbie to PERL language...If i have a file with data of form abcd 4 {1,2,3} 3 lmn- 3 {12,18,19,22} 4 then i can read them as... ($list $listTotal $set $noElements) = split /...
11
by: Brian | last post by:
I have been working on a data reception system.. I am still finding my way around Javascript, though I am accomplishing much. I just fixed a flaw that was really hard to find. The symptoms are...
12
by: garyusenet | last post by:
string lines = File.ReadAllLines(@"c:\text\history.txt"); foreach (string s in lines) { ArrayList results = new ArrayList(); string delimit = ";"; string currentline = s.Split(";"); ...
2
by: kriz4321 | last post by:
Hi all I have a file with below contents I need to store all the values in leftside into an array and right side into another array. Filename:list.txt ram,kriz rakesh,ssss perl,unix If we...
5
by: kumarboston | last post by:
Hi All, I fetched a sequence from my database into mysql_query and then I want to split in the group of 60 and print it. I am using while loop and pushing into array and then trying to split it and...
4
by: Gangreen | last post by:
Hi, I'm new to Perl but I have some experience in other languages. Anyway I need to split a string on the character "|". let's say our string is "one|two|three" when I try the following code:...
5
Kelicula
by: Kelicula | last post by:
Hello all. I have a problem which seems to make no sense to me. Therefore I must be doing something wrong. I am trying to populate an array using split with a regexe. Here is the code (snippet...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.