Skip to content
Snippets Groups Projects
Commit 4155dd0d authored by tcarver's avatar tcarver
Browse files

fix for blast+

parent 3ee07a70
Branches
Tags
No related merge requests found
......@@ -61,6 +61,7 @@ public class FastaTextPane extends JScrollPane
protected static int MAX_HITS = 70;
private static boolean remoteMfetch = false;
private static boolean forceUrl = false;
private boolean blastPlus = false;
static
{
......@@ -159,6 +160,8 @@ public class FastaTextPane extends JScrollPane
if(line.startsWith("BLASTP"))
{
format = "blastp";
if(line.indexOf("+") > -1)
blastPlus = true;
break;
}
else if(line.indexOf("FASTA") > -1)
......@@ -339,6 +342,23 @@ public class FastaTextPane extends JScrollPane
else if(line.startsWith("Query="))
{
int ind2 = 0;
if(blastPlus)
{
ind2 = line.indexOf("Length=");
if(ind2 == -1)
{
while((line = buffReader.readLine()).indexOf("Length=") < 0)
{
len += line.length()+1;
sbuff.append(line+"\n");
}
ind2 = line.indexOf("Length=");
}
ind1 = line.length();
qlen = Integer.parseInt(line.substring(ind2+7,ind1).trim());
}
else
{
ind1 = line.indexOf(" letters)");
if(ind1 == -1)
{
......@@ -357,7 +377,7 @@ public class FastaTextPane extends JScrollPane
qlen = Integer.parseInt(line.substring(ind2+1,ind1).trim());
}
}
textPosition += len;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment