简体   繁体   English

用Java存储多序列文件

[英]multiple sequence file storing in java

I have sequence files which contains 60 columns and 182 rows. 我有包含60列和182行的序列文件。 The sequences are normal DNA sequences like A, C, T, G and also contains - into it. 序列是正常的DNA序列,例如A,C,T,G,并且还包含-。 What should I use to store and retrieve it java? 我应该使用什么来存储和检索Java? Will it be useful to have String class concept or something else? 具有String类概念或其他东西会有用吗?

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 http://docs.oracle.com/javase/6/docs/api/java/util/ArrayList.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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