else if ( s.equalsIgnoreCase( "sequence_acc" ) ) {
setExtDescNodeDataToReturn( NODE_DATA.SEQUENCE_ACC );
}
+ else if ( s.equalsIgnoreCase( "sequence_mol_seq_fasta" ) ) {
+ setExtDescNodeDataToReturn( NODE_DATA.SEQUENCE_MOL_SEQ_FASTA );
+ }
else if ( s.equalsIgnoreCase( "sequence_mol_seq" ) ) {
setExtDescNodeDataToReturn( NODE_DATA.SEQUENCE_MOL_SEQ );
}
public final static boolean __SYNTH_LF = false; // TODO remove me
public final static boolean ALLOW_DDBJ_BLAST = false;
public final static String PRG_NAME = "Archaeopteryx";
- final static String VERSION = "0.9800";
- final static String PRG_DATE = "130108";
+ final static String VERSION = "0.9801";
+ final static String PRG_DATE = "130125";
final static String DEFAULT_CONFIGURATION_FILE_NAME = "_aptx_configuration_file";
final static String[] DEFAULT_FONT_CHOICES = { "Verdana", "Tahoma",
"Arial", "Helvetica", "Dialog", "Lucida Sans", "SansSerif", "Sans-serif", "Sans" };
case SEQUENCE_MOL_SEQ:
s = "Molecular Sequence";
break;
+ case SEQUENCE_MOL_SEQ_FASTA:
+ s = "Molecular Sequence (Fasta)";
+ break;
case SEQUENCE_NAME:
s = "Sequence Names";
break;
return "Sequence Symbols";
case SEQUENCE_MOL_SEQ:
return "Molecular Sequences";
+ case SEQUENCE_MOL_SEQ_FASTA:
+ return "Molecular Sequences (Fasta)";
case SEQUENCE_ACC:
return "Sequence Accessors";
case TAXONOMY_SCIENTIFIC_NAME:
}
break;
case SEQUENCE_MOL_SEQ_FASTA:
- StringBuilder sb = new StringBuilder();
+ final StringBuilder sb = new StringBuilder();
if ( n.getNodeData().isHasSequence()
&& !ForesterUtil.isEmpty( n.getNodeData().getSequence().getMolecularSequence() ) ) {
if ( !ForesterUtil.isEmpty( n.getNodeData().getSequence().getName() ) ) {
- sb.append( SequenceWriter.toFasta( n.getNodeData().getSequence().getName(), n.getNodeData().getSequence().getMolecularSequence(), 60 ) );
+ sb.append( SequenceWriter.toFasta( n.getNodeData().getSequence().getName(), n.getNodeData()
+ .getSequence().getMolecularSequence(), 60 ) );
}
else {
- sb.append( SequenceWriter.toFasta( n.getName(), n.getNodeData().getSequence().getMolecularSequence(), 60 ) );
-
+ sb.append( SequenceWriter.toFasta( n.getName(), n.getNodeData().getSequence()
+ .getMolecularSequence(), 60 ) );
}
- data.add( sb.toString() + "\n" );
+ data.add( sb.toString() );
}
break;
case SEQUENCE_ACC:
}
return sb;
}
-
+
public static StringBuilder toFasta( final String name, final String mol_seq, final int width ) {
final StringBuilder sb = new StringBuilder();
sb.append( ">" );
}
else {
final int lines = mol_seq.length() / width;
- final int rest =mol_seq.length() - ( lines * width );
+ final int rest = mol_seq.length() - ( lines * width );
for( int i = 0; i < lines; ++i ) {
sb.append( mol_seq, i * width, width );
if ( i < ( lines - 1 ) ) {