简体   繁体   中英

multiple sequence file storing in java

I have sequence files which contains 60 columns and 182 rows. The sequences are normal DNA sequences like A, C, T, G and also contains - into it. What should I use to store and retrieve it java? Will it be useful to have String class concept or something else?

import java.io.*;
public class file 
{
public static void main(String args[]) throws Exception 
{
file fl=new file("FASTA71_5");
FileReader fr=new FileReader(fl);
BufferedReader br=new BufferedReader(fr);
String s;
while((s=br.readLine())!=null) 
{
System.out.println(s);
//System.out.println(s.replace("-","0").replace("G","1")); 
}
//System.out.println(s.replace("-","0").replace("G","1")); } } `enter code here`

Use List. In each list element you should hold different sequence.

http://docs.oracle.com/javase/6/docs/api/java/util/ArrayList.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM