By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,660 Members | 1,299 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,660 IT Pros & Developers. It's quick & easy.

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

P: 1
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
Share this question for a faster answer!
Share on Google+

Post your reply

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