This file is indexed.

/usr/include/libMems-1.6/libMems/MuscleInterface.h is in libmems-1.6-dev 1.6.0+4725-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
/*******************************************************************************
 * $Id: MuscleInterface.h,v 1.12 2004/04/19 23:10:50 darling Exp $
 * This file is copyright 2002-2007 Aaron Darling and authors listed in the AUTHORS file.
 * This file is licensed under the GPL.
 * Please see the file called COPYING for licensing details.
 * **************
 ******************************************************************************/

#ifndef _MuscleInterface_h_
#define _MuscleInterface_h_

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "libMems/NumericMatrix.h"
#include "libGenome/gnFilter.h"
#include "libGenome/gnSequence.h"
#include "libMems/GappedAlignment.h"
#include "libMems/GappedAligner.h"

// attempt to auto-link the MUSCLE library on windows
#if defined(WIN64)&&defined(NDEBUG)&&!defined(FASTDEBUG)&&defined(_OPENMP)
#pragma comment(lib, "MUSCLE64omp.lib")
#endif
#if defined(WIN64)&&defined(FASTDEBUG)&&defined(_OPENMP)
#pragma comment(lib, "MUSCLE64fdomp.lib")
#endif
#if defined(WIN32)&&!defined(WIN64)&&defined(NDEBUG)&&!defined(FASTDEBUG)&&defined(_OPENMP)
#pragma comment(lib, "MUSCLEomp.lib")
#endif
#if defined(WIN32)&&!defined(WIN64)&&defined(FASTDEBUG)&&defined(_OPENMP)
#pragma comment(lib, "MUSCLEfdomp.lib")
#endif
#if defined(WIN64)&&defined(NDEBUG)&&!defined(FASTDEBUG)&&!defined(_OPENMP)
#pragma comment(lib, "MUSCLE64.lib")
#endif
#if defined(WIN64)&&defined(FASTDEBUG)&&!defined(_OPENMP)
#pragma comment(lib, "MUSCLE64fd.lib")
#endif
#if defined(WIN32)&&!defined(WIN64)&&defined(NDEBUG)&&!defined(FASTDEBUG)&&!defined(_OPENMP)
#pragma comment(lib, "MUSCLE.lib")
#endif
#if defined(WIN32)&&!defined(WIN64)&&defined(FASTDEBUG)&&!defined(_OPENMP)
#pragma comment(lib, "MUSCLEfd.lib")
#endif

namespace mems {

extern bool debug_muscle;

//template< typename MatchType=AbstractMatch >
class MuscleInterface : public GappedAligner {
public:
	~MuscleInterface()
	{
		ClearCommandLine();
	}
	/**
	 * Returns a reference to a usable MuscleInterface
	 */
	static MuscleInterface& getMuscleInterface();

	/**
	 * Parse the execution path from argv[0] and set the muscle
	 * path accordingly
	 */
	void ParseMusclePath( const char* argv0 );

	/** 
	 * Set the path to the muscle executable
	 * Defaults to "muscle"
	 */
	void SetMusclePath( const std::string& path );

	/** 
	 * Set the arguments to use when executing muscle 
	 */
	void SetExtraMuscleArguments( const std::string& extra_args );
	/** 
	 * Get the arguments to use when executing muscle 
	 */
	std::string GetExtraMuscleArguments(){ return this->extra_muscle_arguments; };

	/**
	 * Attempts to perform a multiple alignment using Muscle between
	 * <code>r_begin</code> and <code>r_end</code>
	 */
	
	//tjt: not the best way of doing this, should have just one Align function that takes an AbstractMatch*,
	//     not both Match* & AbstractMatch* in separate, nearly identical functions..
	//     Such a change would involve changes to GappedAligner, and would require some additional care taken
	//     with SeqCount & Multiplicity, as well as seq_table[ seqI ]->length()/seq_table[ 0 ]->length(i),
	//     for now, leave like this. hopefully sooner than later, make pretty!
	boolean Align( GappedAlignment& cr, Match* r_begin, Match* r_end, std::vector< genome::gnSequence* >& seq_table);
    
	boolean Align( GappedAlignment& cr, AbstractMatch* r_begin, AbstractMatch* r_end, std::vector< genome::gnSequence* >& seq_table);

	bool Refine( GappedAlignment& ga, size_t windowsize = 0 );

	/**
	 * Given two gapped alignments in ga1 and ga2, align them and store the result in aln.  ga1 and
	 * ga2 must have equal sequence count and contain disjoint sets of sequences, e.g. for any given
	 * seqI, if ga1.LeftEnd(seqI) != NO_MATCH, then ga2.LeftEnd(seqI) == NO_MATCH 
	 */
	bool ProfileAlign( const GappedAlignment& ga1, const GappedAlignment& ga2, GappedAlignment& aln, bool anchored = true );
	boolean CallMuscle( std::vector< std::string >& aln_matrix, const std::vector< std::string >& seq_table );
	boolean CallMuscleFast( std::vector< std::string >& aln_matrix, const std::vector< std::string >& seq_table, int gap_open = 0, int gap_extend = 0);
	bool RefineFast( GappedAlignment& ga, size_t windowsize = 0 );
	bool ProfileAlignFast( const GappedAlignment& ga1, const GappedAlignment& ga2, GappedAlignment& aln, bool anchored = true );

	void CreateTree( const NumericMatrix<double>& distances, const std::string& tree_filename  );

protected:
	std::string muscle_path;
	std::string muscle_arguments;
	std::string extra_muscle_arguments;
	char** muscle_cmdline;

	void SetMuscleArguments( const std::string& extra_args );
	
	void ClearCommandLine()
	{
		if( muscle_cmdline != NULL )
		{
			size_t cmdI = 0;
			while(muscle_cmdline[cmdI] != NULL)
			{
				delete[] muscle_cmdline[cmdI];
				cmdI++;
			}
			delete[] muscle_cmdline;
		}
	}

private:
	MuscleInterface( const MuscleInterface& ci ){ *this = ci; }
	MuscleInterface& operator=( const MuscleInterface& ci );
	MuscleInterface();
};


void stripGapColumns( std::vector< std::string >& aln );


}

#endif // _MuscleInterface_h_