Thanks, could you help me with this though? I want to be able to write simple programs to look at sequences. Read in a fasta file and do basic analysis- number of total nucleotides, how many of each? This is a simple program for work, just to make my life easier.
If you could help with that, that would be awesome! Here is what I have, which basically just prints everything in the file. I want to count the number of nucleotides and total.. but I have trouble with the String [] and it keeps everything in lines instead of characters.
package textfiles;
import java.io.IOException;
public class FileData {
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
String file_name = "somefile.fna";
try {
ReadFile file = new ReadFile(file_name);
String [] sequence = file.OpenFile();
int i;
for (i=0; I < sequence.length; i++){
System.out.println(sequence[i]);
}
}
catch (IOException e) {
System.out.println(e.getMessage());
}
}
}