public static void main(String[] args) throws IOException {
    //		Sequence[] s1 = readDatabase(new File("N:/temp/lean-dataset/imp_struct.fasta"), 1);
    //
    //		System.out.println(Arrays.toString(s1));
    //
    //		Sequence[] s2 = readDatabase(new File("N:/temp/lean-dataset/sol.fasta"), 1);
    //
    //		System.out.println(Arrays.toString(s2));

    Sequence[] s3 = readDatabase(new File(args[0]), 1);
    System.out.println(Arrays.toString(s3));

    for (Sequence s : s3) System.out.println(s.getId() + "\n" + s.getSequence() + "\n");
  }
Beispiel #2
0
 public final String printAA(String prefix, Sequence seq) {
   StringBuilder sb = new StringBuilder(prefix);
   for (SequencePosition sp : seq.getSequence()) {
     sb.append(sp.getAminoAcid().toString());
   }
   return sb.toString();
 }
Beispiel #3
0
 public final String printHPalgebraicSign(String prefix, Sequence seq) {
   StringBuilder sb = new StringBuilder(prefix);
   for (SequencePosition sp : seq.getSequence()) {
     if (sp.getHydrophobicity() > 0) {
       sb.append("+");
     } else {
       sb.append("-");
     }
   }
   return sb.toString();
 }
Beispiel #4
0
 public final String printSSE(String prefix, Sequence seq) {
   StringBuilder sb = new StringBuilder(prefix);
   for (SequencePosition sp : seq.getSequence()) {
     String sse = sp.getSecondaryStructure().toString().toLowerCase();
     if (sse.equals("helix")) {
       sb.append("H");
     } else if (sse.equals("coil")) {
       sb.append("c");
     } else {
       sb.append("_");
     }
   }
   return sb.toString();
 }
Beispiel #5
0
 public final String printHPvalues(String prefix, Sequence seq) {
   NumberFormat nf = NumberFormat.getIntegerInstance(Locale.ENGLISH);
   nf.setMaximumFractionDigits(0);
   nf.setMinimumFractionDigits(0);
   nf.setMaximumIntegerDigits(1);
   nf.setMinimumIntegerDigits(1);
   StringBuilder sb = new StringBuilder(prefix);
   for (SequencePosition sp : seq.getSequence()) {
     double hp = sp.getHydrophobicity();
     String out = nf.format(hp);
     if (out.contains("-")) {
       sb.append(out.substring(1, 2));
     } else {
       sb.append(out);
     }
   }
   return sb.toString();
 }