Skip to content
Snippets Groups Projects
Commit 8c907ba1 authored by tcarver's avatar tcarver
Browse files

add getContigs()

parent 81450504
No related branches found
No related tags found
No related merge requests found
...@@ -26,6 +26,7 @@ import java.io.File; ...@@ -26,6 +26,7 @@ import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.io.Writer; import java.io.Writer;
import java.util.Iterator; import java.util.Iterator;
import java.util.Vector;
import javax.swing.JOptionPane; import javax.swing.JOptionPane;
...@@ -214,6 +215,20 @@ public class IndexFastaStream extends StreamSequence ...@@ -214,6 +215,20 @@ public class IndexFastaStream extends StreamSequence
return null; return null;
} }
public Vector<String> getContigs()
{
Iterator it = fastaIndex.iterator();
Vector<String> contigs = new Vector<String>();
while(it.hasNext())
{
String contig = it.next().toString().split(";")[0];
if(contig.startsWith("contig "))
contig = contig.substring(6).trim();
contigs.add( contig );
}
return contigs;
}
public ReferenceSequence getReferenceSequence(int seqIndex) public ReferenceSequence getReferenceSequence(int seqIndex)
{ {
int i = 0; int i = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment