diff --git a/uk/ac/sanger/artemis/components/variant/VCFRecord.java b/uk/ac/sanger/artemis/components/variant/VCFRecord.java new file mode 100644 index 0000000000000000000000000000000000000000..71cea44d0e5f373bd45fca8153443d7f3dc6d7e2 --- /dev/null +++ b/uk/ac/sanger/artemis/components/variant/VCFRecord.java @@ -0,0 +1,48 @@ +/* + * created: 2010 + * + * This file is part of Artemis + * + * Copyright(C) 2010 Genome Research Limited + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or(at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + */ + +package uk.ac.sanger.artemis.components.variant; + +import java.util.HashMap; +import java.util.Iterator; + +class VCFRecord +{ + public String alt; + public String ref; + int seqID; + int pos; + float quality; + String info; + String format; + HashMap<String, String> data = new HashMap<String, String>(); + + public String toString() + { + StringBuffer buff = new StringBuffer(); + Iterator<String> it = data.values().iterator(); + while(it.hasNext()) + buff.append(it.next()+ ( (it.hasNext()) ? ":" : "" ) ); + return seqID+"\t"+pos+"\t"+ref+"\t"+alt+"\t"+quality+"\t"+info+"\t"+format+"\t"+buff.toString(); + } +} \ No newline at end of file