if ( cla.isOptionSet( DOMAIN_COMBINITONS_OUTPUT_OPTION_FOR_GRAPH_ANALYSIS ) ) {
output_binary_domain_combinationsfor_graph_analysis = true;
}
- final boolean output_binary_domain_combinationsfor_counts = false;
+ boolean output_binary_domain_combinationsfor_counts = false;
if ( cla.isOptionSet( DOMAIN_COMBINITONS_COUNTS_OUTPUT_OPTION ) ) {
- output_binary_domain_combinationsfor_graph_analysis = true;
+ output_binary_domain_combinationsfor_counts = true;
}
if ( cla.isOptionSet( surfacing.MAX_FS_E_VALUE_OPTION ) ) {
try {
SurfacingUtil.writeProteinListsForAllSpecies( out_dir,
protein_lists_per_species,
gwcd_list,
- output_list_of_all_proteins_per_domain_e_value_max );
+ output_list_of_all_proteins_per_domain_e_value_max,
+ positive_filter_file != null ? filter : null );
}
gwcd_list = null;
if ( all_bin_domain_combinations_gained_fitch != null ) {
catch ( final IOException e ) {
ForesterUtil.fatalError( surfacing.PRG_NAME, e.getMessage() );
}
- ForesterUtil.programMessage( surfacing.PRG_NAME, "Wrote binary domain combination for \""
- + input_file_properties[ i ][ 0 ] + "\" (" + input_file_properties[ i ][ 1 ] + ", "
- + input_file_properties[ i ][ 2 ] + ") to: \"" + dc_outfile_dot + "\"" );
+ if ( input_file_properties[ i ].length == 3 ) {
+ ForesterUtil.programMessage( surfacing.PRG_NAME, "Wrote binary domain combination for \""
+ + input_file_properties[ i ][ 0 ] + "\" (" + input_file_properties[ i ][ 1 ] + ", "
+ + input_file_properties[ i ][ 2 ] + ") to: \"" + dc_outfile_dot + "\"" );
+ }
+ else {
+ ForesterUtil.programMessage( surfacing.PRG_NAME, "Wrote binary domain combination for \""
+ + input_file_properties[ i ][ 0 ] + "\" (" + input_file_properties[ i ][ 1 ] + ") to: \""
+ + dc_outfile_dot + "\"" );
+ }
}
public static void writeBinaryStatesMatrixAsListToFile( final CharacterStateMatrix<CharacterStateMatrix.GainLossStates> matrix,
public static void writeProteinListsForAllSpecies( final File output_dir,
final SortedMap<Species, List<Protein>> protein_lists_per_species,
final List<GenomeWideCombinableDomains> gwcd_list,
- final double domain_e_cutoff ) {
+ final double domain_e_cutoff,
+ final Set<String> pos_filter_doms ) {
final SortedSet<String> all_domains = new TreeSet<String>();
for( final GenomeWideCombinableDomains gwcd : gwcd_list ) {
all_domains.addAll( gwcd.getAllDomainIds() );
}
for( final String domain : all_domains ) {
+ if ( !ForesterUtil.isEmpty( pos_filter_doms ) && !pos_filter_doms.contains( domain ) ) {
+ continue;
+ }
final File out = new File( output_dir + ForesterUtil.FILE_SEPARATOR + domain + surfacing.SEQ_EXTRACT_SUFFIX );
checkForOutputFileWriteability( out );
try {