final static private String INPUT_SPECIES_TREE_OPTION = "species_tree";
final static private String SEQ_EXTRACT_OPTION = "prot_extract";
final static private char SEPARATOR_FOR_INPUT_VALUES = '#';
- final static private String PRG_VERSION = "2.251";
- final static private String PRG_DATE = "2012.07.13";
+ final static private String PRG_VERSION = "2.252";
+ final static private String PRG_DATE = "2012.08.01";
final static private String E_MAIL = "czmasek@burnham.org";
final static private String WWW = "www.phylosoft.org/forester/applications/surfacing";
final static private boolean IGNORE_DUFS_DEFAULT = true;
protein_lists_per_species,
domain_id_to_go_ids_map,
go_id_to_term_map,
- plus_minus_analysis_numbers );
+ plus_minus_analysis_numbers
+ );
}
if ( output_protein_lists_for_all_domains ) {
- writeProteinListsForAllSpecies( out_dir, protein_lists_per_species, gwcd_list );
+ writeProteinListsForAllSpecies( out_dir, protein_lists_per_species, gwcd_list, 1.0 );
}
// if ( ( intrees != null ) && ( intrees.length > 0 ) && ( inferred_trees != null ) && ( inferred_trees.size() > 0 ) ) {
// final StringBuilder parameters_sb = createParametersAsString( ignore_dufs,
private static void writeProteinListsForAllSpecies( final File output_dir,
final SortedMap<Species, List<Protein>> protein_lists_per_species,
- final List<GenomeWideCombinableDomains> gwcd_list ) {
+ final List<GenomeWideCombinableDomains> gwcd_list,
+ final double domain_e_cutoff ) {
final SortedSet<DomainId> all_domains = new TreeSet<DomainId>();
for( final GenomeWideCombinableDomains gwcd : gwcd_list ) {
all_domains.addAll( gwcd.getAllDomainIds() );
domain,
proteins_file_writer,
"\t",
- LIMIT_SPEC_FOR_PROT_EX );
+ LIMIT_SPEC_FOR_PROT_EX,
+ domain_e_cutoff );
proteins_file_writer.close();
}
catch ( final IOException e ) {
final DomainId domain_id,
final Writer out,
final String separator,
- final String limit_to_species ) throws IOException {
+ final String limit_to_species,
+ final double domain_e_cutoff ) throws IOException {
for( final Species species : protein_lists_per_species.keySet() ) {
for( final Protein protein : protein_lists_per_species.get( species ) ) {
if ( ForesterUtil.isEmpty( limit_to_species )
out.write( domain_id.toString() );
out.write( separator );
for( final Domain domain : domains ) {
- out.write( "/" );
- out.write( domain.getFrom() + "-" + domain.getTo() );
+ if ( domain_e_cutoff < 0 || domain.getPerDomainEvalue() <= domain_e_cutoff ) {
+ out.write( "/" );
+ out.write( domain.getFrom() + "-" + domain.getTo() );
+ }
}
out.write( "/" );
out.write( separator );
- Domain domain_ary[] = new Domain[ protein.getProteinDomains().size() ];
+ final List<Domain> domain_list = new ArrayList<Domain>();
+
+ for( final Domain domain : protein.getProteinDomains() ) {
+ if ( domain_e_cutoff < 0 || domain.getPerDomainEvalue() <= domain_e_cutoff ) {
+ domain_list.add( domain );
+ }
+ }
+
+ Domain domain_ary[] = new Domain[ domain_list.size() ];
- for( int i = 0; i < protein.getProteinDomains().size(); ++i ) {
- domain_ary[ i ] = protein.getProteinDomains().get( i );
+ for( int i = 0; i < domain_list.size(); ++i ) {
+ domain_ary[ i ] = domain_list.get( i );
}
- Arrays.sort( domain_ary, new DomainComparator( false ) );
+ Arrays.sort( domain_ary, new DomainComparator( true ) );
out.write( "{" );
boolean first = true;
out.write( "," );
}
out.write( domain.getDomainId().toString() );
- out.write( ":" );
- out.write( domain.getFrom() );
- out.write( "-" );
- out.write( domain.getTo() );
+ out.write( ":" + domain.getFrom() + "-" + domain.getTo() );
+ out.write( ":" + domain.getPerDomainEvalue() );
}
out.write( "}" );
if ( !( ForesterUtil.isEmpty( protein.getDescription() ) || protein.getDescription()