Skip to content

Commit

Permalink
ok
Browse files Browse the repository at this point in the history
  • Loading branch information
U-MATIS\sigmar committed Oct 14, 2011
1 parent bf1c100 commit 00b0456
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
12 changes: 9 additions & 3 deletions Taxonomy/src/org/simmi/client/Taxonomy.java
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public void onSuccess(String result) {
db.setAutoHideEnabled( true );
cap.setText("Fasta");
TextArea ta = new TextArea();
ta.setSize("400px", "300px");
ta.setSize("512px", "384px");
db.add( ta );

ta.setText( result );
Expand Down Expand Up @@ -294,7 +294,8 @@ public void stuff( String str, TreeItem rootitem ) {
for( String s : split ) {
boolean gogg = s.startsWith(">");
boolean svig = s.startsWith("(");
if( s.length() > 0 && !svig && !gogg && !first ) {
boolean nohi = s.startsWith("*");
if( s.length() > 0 && !svig && !gogg && !nohi && !first ) {
String[] subs = s.split("\\:");
if( subs.length > 1 ) {
current = rootitem;
Expand Down Expand Up @@ -331,13 +332,15 @@ public void stuff( String str, TreeItem rootitem ) {
for( String splstr : spl ) {
current.addItem( splstr );
}
} else if( nohi ) {
current = current.addItem("*** No hits ***");
} else {
current = rootitem;
}
first = false;
}

recursiveCount( rootitem );
//recursiveCount( rootitem );
}

public int recursiveCount( TreeItem item ) {
Expand All @@ -346,6 +349,9 @@ public int recursiveCount( TreeItem item ) {
if( item.getText().startsWith(">") ) {
String[] ss = item.getText().split("[\t ]+");
total = Integer.parseInt( ss[ss.length-1] );
} else if( item.getText().startsWith("*") ) {
total = item.getChildCount();
item.setText( item.getText()+" ("+total+")" );
} else {
for( int i = 0; i < item.getChildCount(); i++ ) {
TreeItem ti = item.getChild(i);
Expand Down
1 change: 1 addition & 0 deletions Taxonomy/src/org/simmi/server/GreetingServiceImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
@SuppressWarnings("serial")
public class GreetingServiceImpl extends RemoteServiceServlet implements GreetingService {


public String greetServer(String input, String searchnum) throws IllegalArgumentException {
StringBuilder ret = new StringBuilder();

Expand Down
15 changes: 11 additions & 4 deletions distann/src/org/simmi/GeneSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -2440,9 +2440,16 @@ private static void loci2gene( Reader rd, String outfile, String filtercont, Map
boolean first = true;
List<String> res = maplist.get(nid);
for( String rstr : res ) {
if( rstr != null ) {
if( rstr != null ) {
String[] rspl = rstr.split("\t");
if( rspl.length == 4 ) {
if( rspl.length == 1 ) {
if( first ) {
first = false;
fw.write( rspl[0] );
} else {
fw.write( "," + rspl[0] );
}
} else if( rspl.length == 4 ) {
if( first ) {
first = false;
fw.write( rspl[0] + " " + rspl[2] );
Expand Down Expand Up @@ -4460,8 +4467,8 @@ public static void main(String[] args) {
}*/
loci2gene( new FileReader("c:/viggo/6.blastout"), "c:/viggo/6v3.txt", null, freqmap );

//Map<String,Integer> freqmap = loadFrequency( new FileReader("/home/sigmar/arciformis_repeat.blastout") );
//loci2gene( new FileReader("/home/sigmar/arciformis_repeat.blastout"), "/home/sigmar/arciformis_v1.txt", null, freqmap );
//Map<String,Integer> freqmap = loadFrequency( new FileReader("c:/viggo//arciformis_repeat.blastout") );
//loci2gene( new FileReader("c:/viggo/arciformis_repeat.blastout"), "c:/viggo/arciformis_v1.txt", null, freqmap );

/*loci2gene( new FileReader("/home/horfrae/viggo/1.blastout"), "/home/horfrae/viggo/1v.txt", null );
loci2gene( new FileReader("/home/horfrae/viggo/2.blastout"), "/home/horfrae/viggo/2v.txt", null );
Expand Down

0 comments on commit 00b0456

Please sign in to comment.