Repository 's_mart'
hg clone https://toolshed.g2.bx.psu.edu/repos/yufei-luo/s_mart

Changeset 20:c265f13066d8 (2013-04-29)
Previous changeset 19:9bcfa7936eec (2013-04-29) Next changeset 21:91f8c4ce8c27 (2013-04-29)
Commit message:
Deleted selected files
removed:
commons/launcher/BlatClusterLauncher.py
commons/launcher/BlatProgramLauncher.py
commons/launcher/LaunchBlastclust.py
commons/launcher/LaunchLastZ.py
commons/launcher/LaunchMCL.py
commons/launcher/LaunchMap.py
commons/launcher/LaunchMatcher.py
commons/launcher/LaunchMummerPlot.py
commons/launcher/LaunchNucmer.py
commons/launcher/LaunchPhyML.py
commons/launcher/LaunchPromer.py
commons/launcher/LaunchRefAlign.py
commons/launcher/LaunchRefalign_old.py
commons/launcher/LaunchRepeatMasker.py
commons/launcher/LaunchTRF.py
commons/launcher/LaunchTallymer.py
commons/launcher/MafftClusterLauncher.py
commons/launcher/MafftProgramLauncher.py
commons/launcher/MapClusterLauncher.py
commons/launcher/MapProgramLauncher.py
commons/launcher/NWalignProgramLauncher.py
commons/launcher/RepeatMaskerClusterLauncher.py
commons/launcher/RepeatMaskerProgramLauncher.py
commons/launcher/YassClusterLauncher.py
commons/launcher/YassProgramLauncher.py
commons/launcher/__init__.py
commons/launcher/launchBlasterMatcherPerQuery.py
commons/launcher/launchMafft.py
commons/launcher/launchMreps.py
commons/launcher/launchPhyML.py
commons/launcher/launchPrank.py
commons/launcher/launchTCoffee.py
commons/launcher/launchTEclass.py
commons/launcher/tests/MockDataBankForBlat.py
commons/launcher/tests/MockESTBankForBlat.py
commons/launcher/tests/MockOutputForBlat.py
commons/launcher/tests/Test_BlatClusterLauncher.py
commons/launcher/tests/Test_BlatProgramLauncher.py
commons/launcher/tests/Test_F_BlatProgramLauncher.py
commons/launcher/tests/Test_F_LaunchBlastclust.py
commons/launcher/tests/Test_F_LaunchLastZ.py
commons/launcher/tests/Test_F_LaunchMCL.py
commons/launcher/tests/Test_F_LaunchMap.py
commons/launcher/tests/Test_F_LaunchMatcher.py
commons/launcher/tests/Test_F_LaunchMummerPlot.py
commons/launcher/tests/Test_F_LaunchNucmer.py
commons/launcher/tests/Test_F_LaunchPhyML.py
commons/launcher/tests/Test_F_LaunchPromer.py
commons/launcher/tests/Test_F_LaunchRefAlign.py
commons/launcher/tests/Test_F_LaunchRefalign.py
commons/launcher/tests/Test_F_LaunchRepeatMasker.py
commons/launcher/tests/Test_F_LaunchTRF.py
commons/launcher/tests/Test_F_LaunchTallymer.py
commons/launcher/tests/Test_LaunchBlastclust.py
commons/launcher/tests/Test_LaunchTallymer.py
commons/launcher/tests/Test_MafftClusterLauncher.py
commons/launcher/tests/Test_MafftProgramLauncher.py
commons/launcher/tests/Test_MapClusterLauncher.py
commons/launcher/tests/Test_MapProgramLauncher.py
commons/launcher/tests/Test_NWalignProgramLauncher.py
commons/launcher/tests/Test_RepeatMaskerClusterLauncher.py
commons/launcher/tests/Test_RepeatMaskerProgramLauncher.py
commons/launcher/tests/Test_YassClusterLauncher.py
commons/launcher/tests/Test_YassProgramLauncher.py
commons/launcher/tests/Test_launchTEclass.py
commons/launcher/tests/__init__.py
commons/pyRepetUnit/__init__.py
commons/pyRepetUnit/align/AlignList.py
commons/pyRepetUnit/align/AlignListUtils.py
commons/pyRepetUnit/align/__init__.py
commons/pyRepetUnit/align/hmmOutputParsing/HmmpfamOutput2align.py
commons/pyRepetUnit/align/hmmOutputParsing/HmmscanOutput2align.py
commons/pyRepetUnit/align/hmmOutputParsing/__init__.py
commons/pyRepetUnit/align/hmmOutputParsing/tests/HmmpfamOutput2AlignTestSuite.py
commons/pyRepetUnit/align/hmmOutputParsing/tests/Test_F_Hmmerpfam2align.py
commons/pyRepetUnit/align/hmmOutputParsing/tests/Test_F_HmmpfamOutput2align.py
commons/pyRepetUnit/align/hmmOutputParsing/tests/Test_F_HmmscanOutput2align.py
commons/pyRepetUnit/align/hmmOutputParsing/tests/__init__.py
commons/pyRepetUnit/align/hmmOutputParsing/tests/datas/ConsensusTestFile_nt.fsa
commons/pyRepetUnit/align/hmmOutputParsing/tests/datas/OutputHmmpfamTest
commons/pyRepetUnit/align/hmmOutputParsing/tests/datas/PostPostProcessTestFiltered.align
commons/pyRepetUnit/align/hmmOutputParsing/tests/datas/hmmscanTransformedExpected.align
commons/pyRepetUnit/align/hmmOutputParsing/tests/datas/repetHmmscan.fa
commons/pyRepetUnit/align/hmmOutputParsing/tests/datas/test_hmmpfam_output
commons/pyRepetUnit/align/hmmOutputParsing/tests/datas/test_hmmpfam_output.align
commons/pyRepetUnit/align/tests/Test_AlignListUtils.py
commons/pyRepetUnit/align/tests/__init__.py
commons/pyRepetUnit/align/tests/hmmpfamOutputParsingTestSuite.py
commons/pyRepetUnit/align/transformAACoordIntoNtCoord/TransformAACoordIntoNtCoordInAlignFormat.py
commons/pyRepetUnit/align/transformAACoordIntoNtCoord/__init__.py
commons/pyRepetUnit/align/transformAACoordIntoNtCoord/tests/Test_F_TransformAACoordIntoNtCoordAndScoreFiltering.py
commons/pyRepetUnit/align/transformAACoordIntoNtCoord/tests/Test_TransformAACoordIntoNtCoordInAlignFormat.py
commons/pyRepetUnit/align/transformAACoordIntoNtCoord/tests/TransformAACoordIntoNtCoordTestSuite.py
commons/pyRepetUnit/align/transformAACoordIntoNtCoord/tests/__init__.py
commons/pyRepetUnit/align/transformAACoordIntoNtCoord/tests/datas/ConsensusTestFile_nt.fsa
commons/pyRepetUnit/align/transformAACoordIntoNtCoord/tests/datas/OutputHmmpfamTest.align
commons/pyRepetUnit/align/transformAACoordIntoNtCoord/tests/datas/PostPostProcessTest.align
commons/pyRepetUnit/align/transformAACoordIntoNtCoord/tests/datas/PostPostProcessTestFiltered.align
commons/pyRepetUnit/blastnForClassifierStep1/RepbaseBLRnForClassifierStep1.py
commons/pyRepetUnit/blastnForClassifierStep1/__init__.py
commons/pyRepetUnit/blastnForClassifierStep1/tests/Test_RepbaseBLRnForClassifierStep1.py
commons/pyRepetUnit/blastnForClassifierStep1/tests/__init__.py
commons/pyRepetUnit/components/AbstractClusterLauncher.py
commons/pyRepetUnit/components/AbstractProgramLauncher.py
commons/pyRepetUnit/components/IClusterLauncher.py
commons/pyRepetUnit/components/__init__.py
commons/pyRepetUnit/components/blastx2GFF/__init__.py
commons/pyRepetUnit/components/blastx2GFF/tests/__init__.py
commons/pyRepetUnit/components/blastx2GFF/tests/blastx2GFFTestSuite.py
commons/pyRepetUnit/components/blastx2GFF/tests/datas/dummy.align.match.path
commons/pyRepetUnit/components/blastx2GFF/tests/datas/dummy.align.match.tab
commons/pyRepetUnit/components/blastx2GFF/tests/datas/exp_dummy.gff
commons/pyRepetUnit/components/blastx2GFF/tests/datas/lm_supctg_v2_29_30_vs_BlastBank.align
commons/pyRepetUnit/components/blastx2GFF/tests/datas/lm_supctg_v2_29_30_vs_BlastBank.align.match.map
commons/pyRepetUnit/components/blastx2GFF/tests/datas/lm_supctg_v2_29_30_vs_BlastBank.align.match.path
commons/pyRepetUnit/components/blastx2GFF/tests/datas/lm_supctg_v2_29_30_vs_BlastBank.align.match.tab
commons/pyRepetUnit/convCoord/ConvMapChr2Chunk.py
commons/pyRepetUnit/convCoord/ConvPathChr2Chunk.py
commons/pyRepetUnit/convCoord/ConvSetChr2Chunk.py
commons/pyRepetUnit/convCoord/PathChunkConnector.py
commons/pyRepetUnit/convCoord/__init__.py
commons/pyRepetUnit/convCoord/test/TestConvCoordWithOverlapps.py
commons/pyRepetUnit/convCoord/test/Test_ConvMapChr2Chunk.py
commons/pyRepetUnit/convCoord/test/Test_ConvPathChr2Chunk.py
commons/pyRepetUnit/convCoord/test/Test_ConvSetChr2Chunk.py
commons/pyRepetUnit/convCoord/test/Test_PathChunkConnector.py
commons/pyRepetUnit/convCoord/test/__init__.py
commons/pyRepetUnit/convCoord/test/convCoordTestSuite.py
commons/pyRepetUnit/doc/__init__.py
commons/pyRepetUnit/doc/api-objects.txt
commons/pyRepetUnit/doc/class-tree.html
commons/pyRepetUnit/doc/commons.Checker-module.html
commons/pyRepetUnit/doc/commons.Checker-pysrc.html
commons/pyRepetUnit/doc/commons.Checker.Checker-class.html
commons/pyRepetUnit/doc/commons.Checker.CheckerException-class.html
commons/pyRepetUnit/doc/commons.Checker.ConfigChecker-class.html
commons/pyRepetUnit/doc/commons.Checker.ConfigException-class.html
commons/pyRepetUnit/doc/commons.Checker.IChecker-class.html
commons/pyRepetUnit/doc/commons.Checker._Logger-class.html
commons/pyRepetUnit/doc/commons.IComponentWrapper-module.html
commons/pyRepetUnit/doc/commons.IComponentWrapper-pysrc.html
commons/pyRepetUnit/doc/commons.IComponentWrapper.IComponentWrapper-class.html
commons/pyRepetUnit/doc/commons.IDataProcessor-module.html
commons/pyRepetUnit/doc/commons.IDataProcessor-pysrc.html
commons/pyRepetUnit/doc/commons.IDataProcessor.IDataProcessor-class.html
commons/pyRepetUnit/doc/crarr.png
commons/pyRepetUnit/doc/epydoc.css
commons/pyRepetUnit/doc/epydoc.js
commons/pyRepetUnit/doc/frames.html
commons/pyRepetUnit/doc/help.html
commons/pyRepetUnit/doc/identifier-index.html
commons/pyRepetUnit/doc/index.html
commons/pyRepetUnit/doc/module-tree.html
commons/pyRepetUnit/doc/redirect.html
commons/pyRepetUnit/doc/toc-commons.Checker-module.html
commons/pyRepetUnit/doc/toc-commons.IComponentWrapper-module.html
commons/pyRepetUnit/doc/toc-commons.IDataProcessor-module.html
commons/pyRepetUnit/doc/toc-everything.html
commons/pyRepetUnit/doc/toc.html
commons/pyRepetUnit/fastaTranslation/__init__.py
commons/pyRepetUnit/fastaTranslation/allFrames/TranslateInAllFramesAndReplaceStopByX.py
commons/pyRepetUnit/fastaTranslation/allFrames/__init__.py
commons/pyRepetUnit/fastaTranslation/allFrames/tests/Test_F_TranslateAfastaFileInAllFrameAndReplaceStopsByX.py
commons/pyRepetUnit/fastaTranslation/allFrames/tests/Test_F_TranslateInAllFramesAndReplaceStopByX.py
commons/pyRepetUnit/fastaTranslation/allFrames/tests/Test_TranslateAfastaFileInAllFrameAndReplaceStopsByX.py
commons/pyRepetUnit/fastaTranslation/allFrames/tests/Test_TranslateInAllFramesAndReplaceStopByX.py
commons/pyRepetUnit/fastaTranslation/allFrames/tests/__init__.py
commons/pyRepetUnit/fastaTranslation/allFrames/tests/datas/ConsensusTestFile_aaWithoutStop.fsa
commons/pyRepetUnit/fastaTranslation/allFrames/tests/datas/ConsensusTestFile_nt.fsa
commons/pyRepetUnit/fastaTranslation/allFrames/tests/datas/__init__.py
commons/pyRepetUnit/fastaTranslation/allFrames/tests/datas/test_input_aa.fa
commons/pyRepetUnit/fastaTranslation/allFrames/tests/datas/test_input_nt.fa
commons/pyRepetUnit/fastaTranslation/allFrames/translateAfastaFileInAllFrameAndReplaceStopsByX_script.py
commons/pyRepetUnit/hmmer/HmmpfamClusterComponent.py
commons/pyRepetUnit/hmmer/LaunchPreProcessHmmpfamPostProcessNotInParallel.py
commons/pyRepetUnit/hmmer/__init__.py
commons/pyRepetUnit/hmmer/check/OldDetectFeatureConfigChecker.py
commons/pyRepetUnit/hmmer/check/__init__.py
commons/pyRepetUnit/hmmer/check/test/Test_OldDetectFeaturesConfigChecker.py
commons/pyRepetUnit/hmmer/check/test/__init__.py
commons/pyRepetUnit/hmmer/check/test/detectFeatureConfigCheckerTestSuite.py
commons/pyRepetUnit/hmmer/hmmOutput/HmmOutput.py
commons/pyRepetUnit/hmmer/hmmOutput/HmmOutputProcessing.py
commons/pyRepetUnit/hmmer/hmmOutput/HmmpfamOutputProcessing.py
commons/pyRepetUnit/hmmer/hmmOutput/HmmscanOutputProcessing.py
commons/pyRepetUnit/hmmer/hmmOutput/__init__.py
commons/pyRepetUnit/hmmer/hmmOutput/tests/TestHmmOutputProcessing.py
commons/pyRepetUnit/hmmer/hmmOutput/tests/TestHmmpfamOutputProcessing.py
commons/pyRepetUnit/hmmer/hmmOutput/tests/TestHmmscanOutputProcessing.py
commons/pyRepetUnit/hmmer/hmmOutput/tests/Test_HmmOutput.py
commons/pyRepetUnit/hmmer/hmmOutput/tests/__init__.py
commons/pyRepetUnit/hmmer/hmmOutput/tests/datas/Outputhmmpfam
commons/pyRepetUnit/hmmer/hmmOutput/tests/datas/hmmscanOutput
commons/pyRepetUnit/hmmer/hmmOutput/tests/datas/hmmscanOutput.align
commons/pyRepetUnit/hmmer/hmmOutput/tests/datas/hmmscanOutputTab.txt
commons/pyRepetUnit/hmmer/hmmOutput/tests/datas/test_hmmpfam_output
commons/pyRepetUnit/hmmer/hmmOutput/tests/hmmOutputTestSuite.py
commons/pyRepetUnit/hmmer/profilsSearchInTEClassifier/ProfilesSearch.py
commons/pyRepetUnit/hmmer/profilsSearchInTEClassifier/__init__.py
commons/pyRepetUnit/hmmer/profilsSearchInTEClassifier/tests/Test_ProfilesSearch.py
commons/pyRepetUnit/hmmer/profilsSearchInTEClassifier/tests/__init__.py
commons/pyRepetUnit/hmmer/profilsSearchInTEClassifier/tests/datas/ConsensusFile_test.fa
commons/pyRepetUnit/hmmer/profilsSearchInTEClassifier/tests/datas/DummyRepbase_aa.fa
commons/pyRepetUnit/hmmer/profilsSearchInTEClassifier/tests/datas/DummyRepbase_nt.fa
commons/pyRepetUnit/hmmer/profilsSearchInTEClassifier/tests/datas/hmmbank_test
commons/pyRepetUnit/hmmer/profilsSearchInTEClassifier/tests/datas/hmmpfamOut.align.clean_match.path
commons/pyRepetUnit/hmmer/tests/TestAcceptanceHmmpfamAndParse2alignInparallel.py
commons/pyRepetUnit/hmmer/tests/TestFunctionalHmmpfamAndParse2alignLauncherInParallel.py
commons/pyRepetUnit/hmmer/tests/TestFunctionalHmmpfamClusterComponent.py
commons/pyRepetUnit/hmmer/tests/TestHmmpfamAndParse2alignLauncher.py
commons/pyRepetUnit/hmmer/tests/TestHmmpfamClusterComponent.py
commons/pyRepetUnit/hmmer/tests/TestHmmpfamLauncher.py
commons/pyRepetUnit/hmmer/tests/TestLaunchPreProcessHmmpfamPostProcessNotInParallel.py
commons/pyRepetUnit/hmmer/tests/TestProgramLauncher.py
commons/pyRepetUnit/hmmer/tests/__init__.py
commons/pyRepetUnit/hmmer/tests/datas/Outputhmmpfam
commons/pyRepetUnit/hmmer/tests/datas/config.cfg
commons/pyRepetUnit/hmmer/tests/datas/configTestAcceptanceHmmpfamAndParse2alignLauncherInparallel.cfg
commons/pyRepetUnit/hmmer/tests/datas/configTestFunctionalHmmpfamLauncherInparallel.cfg
commons/pyRepetUnit/hmmer/tests/datas/configTestLaunchPreProcessHmmpfamPostProcessNotInParallel.cfg
commons/pyRepetUnit/hmmer/tests/datas/myhmms
commons/pyRepetUnit/hmmer/tests/datas/test_input_aa.fa
commons/pyRepetUnit/hmmer/tests/datas/test_input_nt.fa
commons/pyRepetUnit/profilesDB/CompleteAProfilesDBFromAFileWithProfilesNamesOrAccNumber.py
commons/pyRepetUnit/profilesDB/InsertProfilesMapFileInDB.py
commons/pyRepetUnit/profilesDB/Profiles.py
commons/pyRepetUnit/profilesDB/ProfilesDB2Map.py
commons/pyRepetUnit/profilesDB/ProfilesDB4Repet.py
commons/pyRepetUnit/profilesDB/ProfilesDatabank.py
commons/pyRepetUnit/profilesDB/ProfilesDatabankUtils.py
commons/pyRepetUnit/profilesDB/__init__.py
commons/pyRepetUnit/profilesDB/tests/InsertProfilesMapFileInDBTestRessources.py
commons/pyRepetUnit/profilesDB/tests/TestCompleteProfilesDBFromProfilesNameListOrAccNumber.py
commons/pyRepetUnit/profilesDB/tests/TestInsertProfilesMapFileInDB.py
commons/pyRepetUnit/profilesDB/tests/TestProfiles.py
commons/pyRepetUnit/profilesDB/tests/TestProfilesDB2Map.py
commons/pyRepetUnit/profilesDB/tests/TestProfilesDatabankUtils.py
commons/pyRepetUnit/profilesDB/tests/Test_F_CompleteProfilDB.py
commons/pyRepetUnit/profilesDB/tests/Test_F_ProfilesDB2Map.py
commons/pyRepetUnit/profilesDB/tests/Test_F_ProfilesDB4Repet.py
commons/pyRepetUnit/profilesDB/tests/Test_ProfilesDB4Repet.py
commons/pyRepetUnit/profilesDB/tests/__init__.py
commons/pyRepetUnit/profilesDB/tests/completeProfilesDBFromAFileWithProfilesList_script.py
commons/pyRepetUnit/profilesDB/tests/datas/ListPfamProfilsInRepbase.txt
commons/pyRepetUnit/profilesDB/tests/datas/ListpfamAccNumber.txt
commons/pyRepetUnit/profilesDB/tests/datas/myhmms
commons/pyRepetUnit/profilesDB/tests/datas/profilesDBTest.hmm
commons/pyRepetUnit/profilesDB/tests/profilesDBTestSuite.py
commons/tools/AlignTEOnGenomeAccordingToAnnotation.py
commons/tools/AnnotationStats.py
commons/tools/BenchmarkTEconsensus.py
commons/tools/CalcCoordCumulLength.py
commons/tools/ChangeSequenceHeaders.py
commons/tools/CheckMysqlConnect.py
commons/tools/CleanClusterNodesAfterRepet.py
commons/tools/CorrelateTEageWithGCcontent.py
commons/tools/FilterAlign.py
commons/tools/GFF3Maker.py
commons/tools/GameXmlMaker.py
commons/tools/GetMultAlignAndPhylogenyPerTErefSeq.py
commons/tools/GetSpecificTELibAccordingToAnnotation.py
commons/tools/HmmOutput2alignAndTransformCoordInNtAndFilterScores_script.py
commons/tools/LaunchBlaster.py
commons/tools/LaunchBlasterInParallel.py
commons/tools/LaunchMatcherInParallel.py
commons/tools/ListAndDropTables.py
commons/tools/MergeMatchsFiles.py
commons/tools/MysqlConnect.py
commons/tools/OrientSequences.py
commons/tools/PostAnalyzeTELib.py
commons/tools/PrepareBatches.py
commons/tools/RetrieveInitHeaders.py
commons/tools/RmvPairAlignInChunkOverlaps.py
commons/tools/SpliceTEsFromGenome.py
commons/tools/SplicerFromAnnotation.py
commons/tools/TEclassifierPE.py
commons/tools/TEclassifierPE_parallelized.py
commons/tools/__init__.py
commons/tools/blast2align.py
commons/tools/dbBestLength.py
commons/tools/dbConsensus.py
commons/tools/dbShuffle.py
commons/tools/dbSplit.py
commons/tools/filterOutMatcher.py
commons/tools/getCumulLengthFromTEannot.py
commons/tools/pathnum2id.py
commons/tools/refalign2fasta.py
commons/tools/removeDescriptionInFastaHeaderProgramLauncher.py
commons/tools/replaceGreaterThanSymbolInFastaHeaderProgramLauncher.py
commons/tools/setnum2id.py
commons/tools/srptBlasterMatcher.py
commons/tools/srptCreateTable.py
commons/tools/srptExportTable.py
commons/tools/srptGameXmlMaker.py
commons/tools/srptPhyML.py
commons/tools/srptTableOverlap.py
commons/tools/tabFileReader.py
commons/tools/tests/MockFastaForReplaceGreaterThanSymbolInFastaHeader.py
commons/tools/tests/Test_AlignTEOnGenomeAccordingToAnnotation.py
commons/tools/tests/Test_CalcCoordCumulLength.py
commons/tools/tests/Test_ChangeSequenceHeaders.py
commons/tools/tests/Test_CorrelateTEageWithGCcontent.py
commons/tools/tests/Test_F_AlignTEOnGenomeAccordingToAnnotation.py
commons/tools/tests/Test_F_CheckMysqlConnect.py
commons/tools/tests/Test_F_FilterAlign.py
commons/tools/tests/Test_F_GFF3Maker.py
commons/tools/tests/Test_F_GameXmlMaker.py
commons/tools/tests/Test_F_GetMultiAlignAndPhylogenyPerTErefSeq.py
commons/tools/tests/Test_F_GetSpecificTELibAccordingToAnnotation.py
commons/tools/tests/Test_F_HmmOutput2alignAndTransformCoordInNtAndFilterScores_script.py
commons/tools/tests/Test_F_LaunchBlaster.py
commons/tools/tests/Test_F_LaunchBlasterInParallel.py
commons/tools/tests/Test_F_LaunchMatcherInParallel.py
commons/tools/tests/Test_F_MergeMatchsFiles.py
commons/tools/tests/Test_F_PostAnalyzeTELib.py
commons/tools/tests/Test_F_ReplaceGreaterThanSymbolInFastaHeader.py
commons/tools/tests/Test_F_RetrieveInitHeaders.py
commons/tools/tests/Test_F_SplicerFromAnnotation.py
commons/tools/tests/Test_F_TEclassifierPE.py
commons/tools/tests/Test_GetMultAlignAndPhylogenyPerTErefSeq.py
commons/tools/tests/Test_GetSpecificTELibAccordingToAnnotation.py
commons/tools/tests/Test_OrientSequences.py
commons/tools/tests/Test_RmvPairAlignInChunkOverlaps.py
commons/tools/tests/Test_SpliceTEsFromGenome.py
commons/tools/tests/Test_getCumulLengthFromTEannot.py
commons/tools/tests/Test_pathnum2id.py
commons/tools/tests/Test_refalign2fasta.py
commons/tools/tests/Test_srptTableOverlap.py
commons/tools/tests/__init__.py
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/BlatClusterLauncher.py
--- a/commons/launcher/BlatClusterLauncher.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,74 +0,0 @@
-#!/usr/bin/env python
-
-##@file
-# Launch BlatProgramLauncher on several files in parallel on a cluster.
-
-
-from pyRepet.launcher.AbstractClusterLauncher import *
-from commons.launcher.BlatProgramLauncher import BlatProgramLauncher
-from commons.core.coord.AlignUtils import AlignUtils
-from commons.tools import srptBlasterMatcher
-
-
-class BlatClusterLauncher( AbstractClusterLauncher ):
-    """
-    Launch Blat on several files in parallel on a cluster.
-    """
-    
-    def __init__( self ):
-        """
-        Constructor.
-        """
-        AbstractClusterLauncher.__init__( self )
-        AbstractClusterLauncher.setAcronym( self, "Blat" )
-        
-        self._cmdLineSpecificOptions = "s:p:A"
-        
-        self._exeWrapper = "BlatProgramLauncher.py"
-        self._prgLauncher = BlatProgramLauncher()
-        self._prgLauncher.setInputFile( GENERIC_IN_FILE )
-        self._prgLauncher.setClean()
-        self._prgLauncher.setVerbosityLevel( 1 )
-        self._prgLauncher.setListFilesToKeep()
-        self._prgLauncher.setListFilesToRemove()
-        
-        
-    def getSpecificHelpAsString( self ):
-        """
-        Return the specific help as a string.
-        """
-        string = ""
-        string += "\nspecific options:"
-        string += "\n     -s: name of the subject file (format='fasta')"
-        string += "\n     -p: parameters for '%s'" % ( self._prgLauncher.getProgramName() )
-        string += "\n     -Z: concatenate output files"
-        string += "\n     -A: same sequences (all-by-all)"
-        return string
-    
-    
-    def getSubjectFile( self ):
-        return self._prgLauncher.getSubjectFile()
-    
-    
-    def getProgramParameters( self ):
-        return self._prgLauncher.getProgramParameters()
-    
-    
-    def processOutputFile( self, tmpFile, outFile ):
-        sortFile = "%s.sort" % ( tmpFile )
-        AlignUtils.sortAlignFile( tmpFile, sortFile )
-        if self._prgLauncher.getAllByAll():
-            srptBlasterMatcher.filterRedundantMatches( sortFile,
-                                                                  outFile )
-            os.remove( sortFile )
-        else:
-            os.rename( sortFile, outFile )
-            
-    def setASpecificAttributeFromCmdLine( self, o, a="" ):
-        if o =="-s":
-            self._prgLauncher.setSubjectFile( a )
-            
-if __name__ == "__main__":
-    i = BlatClusterLauncher()
-    i.setAttributesFromCmdLine()
-    i.run()
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/BlatProgramLauncher.py
--- a/commons/launcher/BlatProgramLauncher.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,192 +0,0 @@
-#!/usr/bin/env python
-
-##@file
-# Launch Blat (pairwise alignment).
-#
-# options:
-#      -h: this help
-#      -i: name of the input file (queries, format='fasta')
-#      -s: name of the subject file (format='fasta')
-#      -p: parameters for 'blat' (default='-d 2')
-#      -o: name of the output file (format='align', default=inFile+'.align')
-#      -c: clean
-#      -v: verbosity level (default=0/1)
-
-
-import os
-import sys
-
-from commons.pyRepetUnit.components.AbstractProgramLauncher import  AbstractProgramLauncher
-
-
-class BlatProgramLauncher( AbstractProgramLauncher ):
-    """
-    Launch Blat (pairwise alignment).
-    """
-    
-    def __init__( self ):
-        """
-        Constructor.
-        """
-        AbstractProgramLauncher.__init__( self )
-        self._prgName = "blat"
-        self._formatInFile = "fasta"
-        self._sbjFile = ""
-        self._prgParam = ""
-        self._allByAll = False
-        
-        
-    def getHelpAsString( self ):
-        string = AbstractProgramLauncher.getHelpAsString(self)
-        string += "\nspecific options:"
-        string += "\n     -s: name of the subject file (database, format='fasta')"
-        string += "\n     -p: parameters for '%s'" % ( self.getProgramName() )
-        string += "\n     -A: same sequences (all-by-all)"
-        string += "\n     -o: name of the output file (format='align', default=inFile+'.align')"
-        return string
-    
-    def getCmdLineOptions(self):
-        return AbstractProgramLauncher.getCmdLineOptions(self) + "s:p:Ao:"
-
-    def setAttributesFromCmdLine( self, o, a = "" ):
-        AbstractProgramLauncher.setAttributesFromCmdLine(self, o, a)
-        if o == "-s":
-            self.setSubjectFile( a )
-        elif o == "-p":
-            self.setProgramParameters( a )
-        elif o == "-A":
-            self.setAllByAll()
-        elif o == "-o":
-            self.setOutputFile( a )
-            
-            
-    def setSubjectFile( self, arg ):
-        self._sbjFile = arg
-        
-        
-    def getSubjectFile( self ):
-        return self._sbjFile
-    
-    
-    def setAllByAll( self ):
-        self._allByAll = True
-        
-        
-    def getAllByAll( self ):
-        return self._allByAll
-    
-    
-    def check( self ):
-        """
-        Check the specific attributes before running the program.
-        """
-        AbstractProgramLauncher.check(self)
-        if self._sbjFile == "":
-            string = "ERROR: missing subject file (-s)"
-            print string
-            print self.getHelpAsString()
-            sys.exit(1)
-        if self.getOutputFile() == "":
-            self.setOutputFile( "%s.align" % ( self.getInputFile() ) )
-            
-            
-    def setWrapperCommandLine( self ):
-        """
-        Set the command-line of the wrapper.
-        Required for BlatClusterLauncher.
-        """
-        self._wrpCmdLine = self.getWrapperName()
-        self._wrpCmdLine += " -i %s" % ( self.getInputFile() )
-        self._wrpCmdLine += " -s %s" % ( self.getSubjectFile() )
-        if self.getProgramParameters() != "":
-            self._wrpCmdLine += " -p '%s'" % ( self.getProgramParameters() )
-        if self.getAllByAll():
-            self._wrpCmdLine += " -A"
-        if self.getOutputFile() == "":
-            self.setOutputFile( "%s.align" % ( self.getInputFile() ) )
-        self._wrpCmdLine += " -o %s" % ( self.getOutputFile() )
-        if self.getClean():
-            self._wrpCmdLine += " -c"
-        self._wrpCmdLine += " -v %i" % ( self.getVerbosityLevel() )
-        
-        
-    def setProgramCommandLine( self ):
-        """
-        Set the command-line of the program.
-        """
-        self._prgCmdLine = self.getProgramName()
-        self._prgCmdLine += " %s" % ( self.getSubjectFile() )
-        self._prgCmdLine += " %s" % ( self.getInputFile() )
-        if self.getProgramParameters() != "":
-            self._prgCmdLine += " %s" % ( self.getProgramParameters() )
-        self._prgCmdLine += " -out=blast8"
-        self._prgCmdLine += " %s.blast" % ( self.getInputFile() )
-        
-        
-    def setListFilesToKeep( self ):
-        """
-        Set the list of files to keep.
-        """
-        if self.getOutputFile() == "":
-            self.setOutputFile( "%s.align" % ( self.getInputFile() ) )
-        self.appendFileToKeep( self.getOutputFile() )
-        
-        
-    def setListFilesToRemove( self ):
-        """
-        Set the list of files to remove.
-        """
-        self.appendFileToRemove( "%s.blast" % ( self.getInputFile() ) )
-        
-        
-    def convertBlastIntoAlign( self ):
-        """
-        Convert a 'blast' file into the 'align' format.
-        """
-        cmd = os.environ["REPET_PATH"] + "/bin/blast2align.py"
-        cmd += " -i %s.blast" % ( self.getInputFile() )
-        cmd += " -o %s" % ( self.getOutputFile() )
-        exitStatus = os.system( cmd )
-        if exitStatus != 0:
-            string = "ERROR while converting 'blast' file into 'align' format"
-            print string
-            sys.exit(1)
-            
-            
-    def setSummary( self ):
-        self._summary = "input file: %s" % ( self.getInputFile() )
-        self._summary += "\nsubject file: %s" % ( self.getSubjectFile() )
-        self._summary += "\nparameters: %s" % ( self.getProgramParameters() )
-        if self.getAllByAll():
-            self._summary += "\nall-by-all"
-        if self.getOutputFile() == "":
-            self.setOutputFile( "%s.align" % ( self.getInputFile() ) )
-        self._summary += "\noutput file: %s" % ( self.getOutputFile() )
-        
-        
-    def run( self ):
-        """
-        Run the program.
-        """
-        self.start()
-        
-        self.setProgramCommandLine()
-        cmd = self.getProgramCommandLine()
-        if self.getVerbosityLevel() > 0:
-            print "LAUNCH: %s" % ( cmd )
-            sys.stdout.flush()
-        exitStatus = os.system( cmd )
-        if exitStatus != 0:
-            string = "ERROR: program '%s' returned exit status '%i'" % ( self.getProgramName(), exitStatus )
-            print string
-            sys.exit(1)
-            
-        self.convertBlastIntoAlign()
-        
-        self.end()
-        
-        
-if __name__ == "__main__":
-    i = BlatProgramLauncher()
-    i.checkAttributesFromCmdLine()
-    i.run()
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/LaunchBlastclust.py
--- a/commons/launcher/LaunchBlastclust.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
b'@@ -1,372 +0,0 @@\n-#!/usr/bin/env python\n-\n-"""\n-Launch Blastclust on nucleotide sequences and return a fasta file.\n-"""\n-\n-# Copyright INRA (Institut National de la Recherche Agronomique)\n-# http://www.inra.fr\n-# http://urgi.versailles.inra.fr\n-#\n-# This software is governed by the CeCILL license under French law and\n-# abiding by the rules of distribution of free software.  You can  use, \n-# modify and/ or redistribute the software under the terms of the CeCILL\n-# license as circulated by CEA, CNRS and INRIA at the following URL\n-# "http://www.cecill.info". \n-#\n-# As a counterpart to the access to the source code and  rights to copy,\n-# modify and redistribute granted by the license, users are provided only\n-# with a limited warranty  and the software\'s author,  the holder of the\n-# economic rights,  and the successive licensors  have only  limited\n-# liability. \n-#\n-# In this respect, the user\'s attention is drawn to the risks associated\n-# with loading,  using,  modifying and/or developing or reproducing the\n-# software by the user in light of its specific status of free software,\n-# that may mean  that it is complicated to manipulate,  and  that  also\n-# therefore means  that it is reserved for developers  and  experienced\n-# professionals having in-depth computer knowledge. Users are therefore\n-# encouraged to load and test the software\'s suitability as regards their\n-# requirements in conditions enabling the security of their systems and/or \n-# data to be ensured and,  more generally, to use and operate it in the \n-# same conditions as regards security. \n-#\n-# The fact that you are presently reading this means that you have had\n-# knowledge of the CeCILL license and that you accept its terms.\n-\n-import os\n-import sys\n-import subprocess\n-from commons.core.seq.BioseqDB import BioseqDB\n-from commons.core.seq.Bioseq import Bioseq\n-from commons.core.utils.RepetOptionParser import RepetOptionParser\n-from commons.tools.ChangeSequenceHeaders import ChangeSequenceHeaders\n-\n-class LaunchBlastclust(object):\n-    """\n-    Launch Blastclust on nucleotide sequences and return a fasta file.\n-    """\n-    \n-    def __init__(self, input = "", outFilePrefix = "", clean = False, verbose = 0):\n-        """\n-        Constructor.\n-        """\n-        self._inFileName = input\n-        self._identityThreshold = 95\n-        self._coverageThreshold = 0.9\n-        self._bothSeq = "T"\n-        self._filterUnclusteredSeq = False\n-        self._outFilePrefix = outFilePrefix\n-        self._isBlastToMap = False\n-        self._isHeaderForTEdenovo = False\n-        self._nbCPUs = 1\n-        self._clean = clean\n-        self._verbose = verbose\n-        self._tmpFileName = ""\n-        \n-    def setAttributesFromCmdLine(self):\n-        """\n-        Set the attributes from the command-line.\n-        """\n-        \n-        description = "Launch Blastclust on nucleotide sequences and return a fasta file."\n-        usage = "LaunchBlastclust.py -i inputFileName [options]"\n-        \n-        examples = "\\nExample 1: launch Blastclust with default options, highest verbose and clean temporary files.\\n"\n-        examples += "\\t$ python ./LaunchBlastclust.py -i MyBank.fa -v 2 -c"\n-        examples += "\\n\\t"\n-        examples += "\\t\\nExample 2: launch Blastclust with an identity threshold of 90%, rename output files and generate a map file corresponding to the fasta output.\\n"\n-        examples += "\\t$ python ./LaunchBlastclust.py -i MyBank.fa -S 90 -o SpecialOutputName -m"\n-        examples += "\\n\\tWARNING: Please refer to -m option limitations in the description above.\\n"\n-        \n-        #TODO: check if the optionParser can handle \'\\\' into strings for a better code readability in -m option\n-        \n-        parser = RepetOptionParser(description = description, usage = usage, version = "v1.0", epilog = examples)\n-        parser.add_option("-i", "--input",          dest = "inFileName",            type = "string",    help = "name of the input fasta file (nucleoti'..b'ine == "":\n-                break\n-            data = line.split("\\t")\n-            dNew2Init[data[0]] = data[1]\n-            line = linkFile.readline()\n-        linkFile.close()\n-        return dNew2Init\n-    \n-    \n-    def retrieveInitHeaders(self, dNewH2InitH):\n-        tmpFaFile = "%s.shortH_Blastclust.fa" % (self._inFileName)\n-        tmpFaFileHandler = open(tmpFaFile, "r")\n-        outFaFile = "%s_Blastclust.fa" % (self._outFilePrefix)\n-        outFaFileHandler = open(outFaFile, "w")\n-        while True:\n-            line = tmpFaFileHandler.readline()\n-            if line == "":\n-                break\n-            if line[0] == ">":\n-                tokens = line[1:-1].split("_")\n-                initHeader = dNewH2InitH[tokens[1]]\n-                if self._isHeaderForTEdenovo:\n-                    classif = initHeader.split("_")[0]\n-                    consensusName = "_".join(initHeader.split("_")[1:])\n-                    clusterId = tokens[0].split("Cluster")[1].split("Mb")[0]\n-                    newHeader = "%s_Blc%s_%s" % (classif, clusterId, consensusName)\n-                else:\n-                    newHeader = "%s_%s" % (tokens[0], initHeader)\n-                outFaFileHandler.write(">%s\\n" % (newHeader))\n-            else:\n-                outFaFileHandler.write(line)\n-        tmpFaFileHandler.close()\n-        outFaFileHandler.close()\n-        if self._clean:\n-            os.remove(tmpFaFile)\n-\n-\n-    def blastclustToMap(self, blastclustFastaOut):\n-        """\n-        Write a map file from blastclust fasta output.\n-        Warning: only works if blastclust\'s fasta input headers are formated like LTRharvest fasta output.\n-        """\n-        fileDb = open(blastclustFastaOut , "r")\n-        mapFilename = "%s.map" % (os.path.splitext(blastclustFastaOut)[0])\n-        fileMap = open(mapFilename, "w")\n-        seq = Bioseq()\n-        numseq = 0\n-        while 1:\n-            seq.read(fileDb)\n-            if seq.sequence == None:\n-                break\n-            numseq = numseq + 1\n-            ID = seq.header.split(\' \')[0].split(\'_\')[0]\n-            chunk = seq.header.split(\' \')[0].split(\'_\')[1]\n-            start = seq.header.split(\' \')[-1].split(\',\')[0][1:]\n-            end = seq.header.split(\' \')[-1].split(\',\')[1][:-1]\n-            line= \'%s\\t%s\\t%s\\t%s\' % (ID, chunk, start, end)\n-            fileMap.write(line + "\\n")\n-    \n-        fileDb.close()\n-        fileMap.close()\n-        print "saved in %s" % mapFilename \n-        \n-        \n-    def start(self):\n-        """\n-        Useful commands before running the program.\n-        """\n-        self.checkAttributes()\n-        if self._verbose > 0:\n-            print "START %s" % (type(self).__name__)\n-            \n-            \n-    def end(self):\n-        """\n-        Useful commands before ending the program.\n-        """\n-        if self._verbose > 0:\n-            print "END %s" % (type(self).__name__)\n-            \n-            \n-    def run(self):\n-        """\n-        Run the program.\n-        """\n-        self.start()\n-        \n-        iCSH = ChangeSequenceHeaders(inFile = self._inFileName, format = "fasta", step = 1, outFile = "%s.shortH" % self._inFileName, linkFile = "%s.shortHlink" % self._inFileName)\n-        iCSH.run()\n-        \n-        self.launchBlastclust("%s.shortH" % (self._inFileName))\n-        \n-        self.getClusteringResultsInFasta("%s.shortH" % (self._inFileName))\n-        \n-        dNewH2InitH = self.getLinkInitNewHeaders()\n-        self.retrieveInitHeaders(dNewH2InitH)\n-        \n-        if self._isBlastToMap:\n-            blastclustFileName = "%s_Blastclust.fa" % (self._outFilePrefix)\n-            self.blastclustToMap(blastclustFileName)\n-        \n-        if self._clean:\n-            os.remove("%s.shortH" % (self._inFileName))\n-            os.remove("%s.shortHlink" % (self._inFileName))\n-        \n-        self.end()\n-        \n-if __name__ == "__main__":\n-    i = LaunchBlastclust()\n-    i.setAttributesFromCmdLine()\n-    i.run()\n'
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/LaunchLastZ.py
--- a/commons/launcher/LaunchLastZ.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,133 +0,0 @@
-#! /usr/bin/env python
-
-# Copyright INRA (Institut National de la Recherche Agronomique)
-# http://www.inra.fr
-# http://urgi.versailles.inra.fr
-#
-# This software is governed by the CeCILL license under French law and
-# abiding by the rules of distribution of free software.  You can  use, 
-# modify and/ or redistribute the software under the terms of the CeCILL
-# license as circulated by CEA, CNRS and INRIA at the following URL
-# "http://www.cecill.info". 
-#
-# As a counterpart to the access to the source code and  rights to copy,
-# modify and redistribute granted by the license, users are provided only
-# with a limited warranty  and the software's author,  the holder of the
-# economic rights,  and the successive licensors  have only  limited
-# liability. 
-#
-# In this respect, the user's attention is drawn to the risks associated
-# with loading,  using,  modifying and/or developing or reproducing the
-# software by the user in light of its specific status of free software,
-# that may mean  that it is complicated to manipulate,  and  that  also
-# therefore means  that it is reserved for developers  and  experienced
-# professionals having in-depth computer knowledge. Users are therefore
-# encouraged to load and test the software's suitability as regards their
-# requirements in conditions enabling the security of their systems and/or 
-# data to be ensured and,  more generally, to use and operate it in the 
-# same conditions as regards security. 
-#
-# The fact that you are presently reading this means that you have had
-# knowledge of the CeCILL license and that you accept its terms.
-
-import sys
-import os
-import optparse
-from commons.core.checker.CheckerUtils import CheckerUtils
-from commons.core.utils.FileUtils import FileUtils
-from subprocess import Popen
-from commons.core.utils.RepetOptionParser import RepetOptionParser
-import subprocess
-import tempfile
-  
-class LaunchLastZ(object):
-
-    def __init__(self,queryFileName="", refFileName ="", outputFileName=None,outputFileFormat="axt",noTransition=True, ambiguous=None, step=1,gfextend=False, chain=False, verbosity=1 ):
-        self.queryFileName = queryFileName
-        self.refFileName = refFileName
-        self.outputFileName = outputFileName
-        self.outputFileFormat = outputFileFormat
-        self.noTransition = noTransition
-        self.step = step
-        self.ambiguous = ambiguous
-        self.gfextend = gfextend
-        self.chain = chain
-        self.verbosity = verbosity
-        
-    def setAttributesFromCmdLine(self):
-        description = "LaunchLastZ runs the LastZ program ."    
-        parser = RepetOptionParser(description = description)
-        parser.add_option("-q", "--query", dest="queryFileName", default = None,  action="store", type="string", help="input query file [compulsory] [format: fasta]")
-        parser.add_option("-r", "--ref", dest="refFileName", default = None,  action="store", type="string", help="input ref file [compulsory] [format: fasta]")
-        parser.add_option("-o", "--output", dest="outputFileName", default = None,  action="store", type="string", help="output file [compulsory] ")
-        parser.add_option("-f", "--format", dest="outputFileFormat", default = "axt",  action="store", type="string", help="output file format[optional] ")
-        parser.add_option("-n", "--notransition", dest="noTransition", action="store_false", default=True, help="noTransition (default True) [optional] ")
-        parser.add_option("-a", "--ambiguous", dest="ambiguous", action="store",  type="string", help="ambiguous [optional] ")
-        parser.add_option("-s", "--step", dest="step", default = 1,  action="store", type="int", help="stepsize (default 1) [optional] ")
-        parser.add_option("-g", "--gfextend", dest="gfextend",  action="store_true",  help="extend gf (default false)[optional] ")
-        parser.add_option("-c", "--chain", dest="chain",  action="store_true", help="chain (default false)[optional] ")
-        parser.add_option("-v", "--verbosity", dest="verbosity", default = 1,  action="store", type="int", help="verbosity [optional] ")
-        (self._options, args) = parser.parse_args()
-        self._setAttributesFromOptions(self._options)
-
-    def _setAttributesFromOptions(self, options):
-        self.queryFileName = options.queryFileName
-        self.refFileName = options.refFileName
-        self.outputFileName = options.outputFileName
-        self.outputFileFormat = options.outputFileFormat
- self.ambiguous = options.ambiguous
-        self.noTransition = options.noTransition
-        self.step = options.step
-        self.gfextend = options.gfextend
-        self.chain = options.chain
-        self.verbosity = options.verbosity
-      
-    def checkOptions(self):       
-        if self.queryFileName != "":
-            if not FileUtils.isRessourceExists(self.queryFileName):
-                raise Exception("ERROR: Query file does not exist!")
-        else:
-            raise Exception("ERROR: No specified --query option!")
-        if self.refFileName != "":
-            if not FileUtils.isRessourceExists(self.refFileName):
-                raise Exception("ERROR: Ref file does not exist!")
-        else:
-            raise Exception("ERROR: No specified --ref option!")
-        if self.outputFileName == None:
-            self.outputFileName = "%s_%s.axt" % (os.path.basename(self.queryFileName), os.path.basename(self.refFileName))
-                                
-    def run(self):
-        if not CheckerUtils.isExecutableInUserPath("lastz") :
-            print ("ERROR: LastZ must be in your path")
-        else:
-            self.checkOptions()
-            
-            transition = "" 
-            if self.noTransition:
-                transition = "--notransition"
-            ambiguous = ""    
-            if self.ambiguous is not None:
-                ambiguous =  "--ambiguous=%s" % self.ambiguous
-                
-            gfextend = ""
-            if self.gfextend:
-                gfextend = "--gfextend"
-                
-            chain = ""
-            if self.chain:
-                chain = "--chain"
-                
-            cmd = "lastz %s[format=fasta] %s[format=fasta] --output=%s --format=%s %s %s --step=%i %s %s" % (self.refFileName, self.queryFileName, self.outputFileName
-                                                                           , self.outputFileFormat, ambiguous, transition,self.step, gfextend, chain)
-            if self.verbosity>0:
-                print("Running LastZ with following commands : %s" %cmd)
-            sys.stdout.flush()
-            cmd = cmd.split()
-            process = subprocess.Popen(cmd)
-            process.wait()
-            return process.returncode
-
-if __name__ == "__main__":
-    iLaunchLastZ = LaunchLastZ()
-    iLaunchLastZ.setAttributesFromCmdLine()
-    iLaunchLastZ.run()
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/LaunchMCL.py
--- a/commons/launcher/LaunchMCL.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
b'@@ -1,239 +0,0 @@\n-#!/usr/bin/env python\n-\n-# Copyright INRA (Institut National de la Recherche Agronomique)\n-# http://www.inra.fr\n-# http://urgi.versailles.inra.fr\n-#\n-# This software is governed by the CeCILL license under French law and\n-# abiding by the rules of distribution of free software.  You can  use, \n-# modify and/ or redistribute the software under the terms of the CeCILL\n-# license as circulated by CEA, CNRS and INRIA at the following URL\n-# "http://www.cecill.info". \n-#\n-# As a counterpart to the access to the source code and  rights to copy,\n-# modify and redistribute granted by the license, users are provided only\n-# with a limited warranty  and the software\'s author,  the holder of the\n-# economic rights,  and the successive licensors  have only  limited\n-# liability. \n-#\n-# In this respect, the user\'s attention is drawn to the risks associated\n-# with loading,  using,  modifying and/or developing or reproducing the\n-# software by the user in light of its specific status of free software,\n-# that may mean  that it is complicated to manipulate,  and  that  also\n-# therefore means  that it is reserved for developers  and  experienced\n-# professionals having in-depth computer knowledge. Users are therefore\n-# encouraged to load and test the software\'s suitability as regards their\n-# requirements in conditions enabling the security of their systems and/or \n-# data to be ensured and,  more generally, to use and operate it in the \n-# same conditions as regards security. \n-#\n-# The fact that you are presently reading this means that you have had\n-# knowledge of the CeCILL license and that you accept its terms.\n-\n-from commons.core.LoggerFactory import LoggerFactory\n-from commons.core.utils.RepetOptionParser import RepetOptionParser\n-from commons.core.seq.FastaUtils import FastaUtils\n-from commons.core.coord.MatchUtils import MatchUtils\n-import subprocess\n-import os\n-import time\n-import shutil\n-from commons.tools.ChangeSequenceHeaders import ChangeSequenceHeaders\n-\n-LOG_DEPTH = "repet.base"\n-\n-##Launch MCL\n-#\n-class LaunchMCL(object):\n-    \n-    def __init__(self, fastaFileName = "", outFilePrefix = "", inflate = 1.5, covThres = 0.0, isJoined = False, isCluster2Map = False, isClusterConsensusHeaders = False, doClean = False, verbosity = 0):\n-        self._fastaFileName = fastaFileName\n-        self.setOutFilePrefix(outFilePrefix)\n-        self._inflate = inflate\n-        self._coverageThreshold = covThres\n-        self._isJoined = isJoined\n-        self._isCluster2Map = isCluster2Map\n-        self._isClusterConsensusHeaders = isClusterConsensusHeaders\n-        self._doClean = doClean\n-        self._verbosity = verbosity\n-        self._log = LoggerFactory.createLogger("%s.%s" % (LOG_DEPTH, self.__class__.__name__), self._verbosity)\n-        \n-    def setAttributesFromCmdLine(self):\n-        description = "Launch MCL clustering program."\n-        epilog = "\\nExample: launch without verbosity and keep temporary files.\\n"\n-        epilog += "\\t$ python LaunchMCL.py -i file.fa -v 0\\n"\n-        parser = RepetOptionParser(description = description, epilog = epilog)\n-        parser.add_option("-i", "--fasta",      dest = "fastaFileName", action = "store",       type = "string", help = "input fasta file name [compulsory] [format: fasta]", default = "")\n-        parser.add_option("-o", "--out",        dest = "outFilePrefix", action = "store",       type = "string", help = "prefix of the output files [default=input fasta file name]",    default = "")\n-        parser.add_option("-I", "--inflate",    dest = "inflate",       action = "store",       type = "float",  help = "inflate parameter of MCL [optional] [default: 1.5]", default = 1.5)\n-        parser.add_option("-T", "--coverage",   dest = "coverageThreshold", action = "store",   type = "float",  help = "length coverage threshold (default=0.0, 0.0 <= value <= 1.0)",              default = 0.0)\n-        parser.add_option("-j", "--join",       dest = "isJoined",          actio'..b'= " -s %s" % linkToFastaFile\n-        cmd += " -a"\n-        cmd += " 1>&2 >> blasterMatcher.log"\n-        process = subprocess.Popen(cmd, shell = True)\n-        self._log.debug("Running : %s" % cmd)\n-        process.communicate()\n-        if process.returncode != 0:\n-            self._logAndRaise("ERROR when launching \'%s\'" % cmd)\n-        outBlasterFileName = "%s.align" % fastaFileNameShorten\n-        \n-        cmd = "matcher"\n-        cmd += " -m %s" % outBlasterFileName\n-        cmd += " -q %s" % fastaFileNameShorten\n-        cmd += " -s %s" % linkToFastaFile\n-        cmd += " -a"\n-        if self._isJoined:\n-            cmd += " -j"\n-        cmd += " 1>&2 >> blasterMatcher.log"\n-        process = subprocess.Popen(cmd, shell=True)\n-        self._log.debug("Running : %s" % cmd)\n-        process.communicate()\n-        if process.returncode != 0:\n-            self._logAndRaise("ERROR when launching \'%s\'" % cmd)\n-        self._log.info("END Blaster-Matcher (%s)" % time.strftime("%Y-%m-%d %H:%M:%S"))\n-        \n-        outMatcherFileName = "%s.match.tab" % outBlasterFileName\n-        inputABCFileName = "%s.shortH.abc" % os.path.splitext(fastaFileNameShorten)[0]\n-        MatchUtils.convertMatchFileIntoABCFileOnQueryCoverage(outMatcherFileName, inputABCFileName, coverage = self._coverageThreshold)\n-        outMCLPreprocessFileName = "MCLPreprocess.out"\n-        \n-        self._log.info("START MCL (%s)" % time.strftime("%Y-%m-%d %H:%M:%S"))\n-        cmd = "mcxload"\n-        cmd += " -abc %s" % inputABCFileName\n-        cmd += " --stream-mirror"\n-        cmd += " --stream-neg-log10"\n-        cmd += " -stream-tf \'ceil(200)\'"\n-        cmd += " -o %s" % outMCLPreprocessFileName\n-        cmd += " -write-tab %s.tab" % outMCLPreprocessFileName\n-        cmd += " 1>&2 > MCLpreprocess.log"\n-        process = subprocess.Popen(cmd, shell = True)\n-        self._log.debug("Running : %s" % cmd)\n-        process.communicate()\n-        if process.returncode != 0:\n-            self._logAndRaise("ERROR when launching \'%s\'" % cmd)\n-        \n-        outMCLFileName = "out.shortH.mcl"\n-        cmd = "mcl"\n-        cmd += " %s" % outMCLPreprocessFileName\n-        cmd += " -I %s" % self._inflate\n-        cmd += " -use-tab %s.tab" % outMCLPreprocessFileName\n-        cmd += " -o %s" % outMCLFileName\n-        cmd += " 1>&2 > MCL.log"\n-        process = subprocess.Popen(cmd, shell = True)\n-        self._log.debug("Running : %s" % cmd)\n-        process.communicate()\n-        if process.returncode != 0:\n-            self._logAndRaise("ERROR when launching \'%s\'" % cmd)\n-        self._log.info("END MCL (%s)" % time.strftime("%Y-%m-%d %H:%M:%S"))\n-\n-        outFastaFileNameShorten = "%s.fa" % os.path.splitext(outMCLFileName)[0]\n-\n-        FastaUtils.convertClusterFileToFastaFile(outMCLFileName, fastaFileNameShorten, outFastaFileNameShorten, "MCL", verbosity = self._verbosity - 1)\n-        \n-        outFastaFileName = "%s_MCL.fa" % self._outFilePrefix\n-        linkFileName = "%s.newHlink" % self._fastaFileName\n-        headerStyle = "A"\n-        if self._isClusterConsensusHeaders:\n-            headerStyle = "B"\n-        iChangeSequenceHeaders = ChangeSequenceHeaders(inFile=outFastaFileNameShorten, format="fasta", step=2, outFile=outFastaFileName, linkFile=linkFileName, whichCluster = headerStyle, verbosity=self._verbosity - 1)\n-        iChangeSequenceHeaders.run()\n-        \n-        if self._isCluster2Map:\n-            outMapFileName = "%s_MCL.map" % self._outFilePrefix\n-            FastaUtils.convertClusteredFastaFileToMapFile(outFastaFileName, outMapFileName)\n-            shutil.move(outMapFileName, "..")\n-\n-        shutil.move(outFastaFileName, "..")\n-        os.chdir("..")\n-        if self._doClean:\n-            self._log.warning("Working directory will be cleaned")\n-            shutil.rmtree(workingDir)\n-        self._log.info("END Launch MCL")\n-\n-if __name__ == "__main__":\n-    iLaunch = LaunchMCL()\n-    iLaunch.setAttributesFromCmdLine()\n-    iLaunch.run()\n'
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/LaunchMap.py
--- a/commons/launcher/LaunchMap.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
b'@@ -1,186 +0,0 @@\n-#!/usr/bin/env python\n-\n-# Copyright INRA (Institut National de la Recherche Agronomique)\n-# http://www.inra.fr\n-# http://urgi.versailles.inra.fr\n-#\n-# This software is governed by the CeCILL license under French law and\n-# abiding by the rules of distribution of free software.  You can  use, \n-# modify and/ or redistribute the software under the terms of the CeCILL\n-# license as circulated by CEA, CNRS and INRIA at the following URL\n-# "http://www.cecill.info". \n-#\n-# As a counterpart to the access to the source code and  rights to copy,\n-# modify and redistribute granted by the license, users are provided only\n-# with a limited warranty  and the software\'s author,  the holder of the\n-# economic rights,  and the successive licensors  have only  limited\n-# liability. \n-#\n-# In this respect, the user\'s attention is drawn to the risks associated\n-# with loading,  using,  modifying and/or developing or reproducing the\n-# software by the user in light of its specific status of free software,\n-# that may mean  that it is complicated to manipulate,  and  that  also\n-# therefore means  that it is reserved for developers  and  experienced\n-# professionals having in-depth computer knowledge. Users are therefore\n-# encouraged to load and test the software\'s suitability as regards their\n-# requirements in conditions enabling the security of their systems and/or \n-# data to be ensured and,  more generally, to use and operate it in the \n-# same conditions as regards security. \n-#\n-# The fact that you are presently reading this means that you have had\n-# knowledge of the CeCILL license and that you accept its terms.\n-\n-from commons.core.LoggerFactory import LoggerFactory\n-from commons.core.utils.RepetOptionParser import RepetOptionParser\n-from commons.core.seq.AlignedBioseqDB import AlignedBioseqDB\n-from commons.core.seq.FastaUtils import FastaUtils\n-from commons.tools.ChangeSequenceHeaders import ChangeSequenceHeaders\n-from commons.core.utils.FileUtils import FileUtils\n-import os\n-import subprocess\n-\n-LOG_DEPTH = "repet.tools"\n-\n-##Reference launcher implementation\n-#\n-class LaunchMap(object):\n-    \n-    def __init__(self, fastaFileName = "", outFileName = "", gapSize = 50, mismatchPenalty = -8, gapOpenPenalty = 16, gapExtendPenalty = 4, doClean = False, verbosity = 0):\n-        self._fastaFileName = fastaFileName\n-        self.setOutFileName(outFileName)\n-        self._gapSize = gapSize\n-        self._mismatchPenalty = mismatchPenalty\n-        self._gapOpenPenalty = gapOpenPenalty\n-        self._gapExtendPenalty = gapExtendPenalty\n-        self._doClean = doClean\n-        self._verbosity = verbosity\n-        self._log = LoggerFactory.createLogger("%s.%s" % (LOG_DEPTH, self.__class__.__name__), self._verbosity)\n-        \n-    def setAttributesFromCmdLine(self):\n-#        description = "Launch template to create a launcher."\n-#        epilog = "\\nExample 1: launch without verbosity and keep temporary files.\\n"\n-#        epilog += "\\t$ python LaunchTemplate.py -i file.fa -v 0"\n-#        epilog += "\\n\\t"\n-#        epilog += "\\nExample 2: launch with verbosity to have errors (level 1) and basic information (level 2), and delete temporary files.\\n"\n-#        epilog += "\\t$ python LaunchTemplate.py -i file.fa -c -v 2"\n-#        parser = RepetOptionParser(description = description, epilog = epilog)\n-        parser = RepetOptionParser(description = "", epilog = "")\n-        parser.add_option("-i", "--fasta",      dest = "fastaFileName", action = "store",       type = "string", help = "input fasta file name [compulsory] [format: fasta]", default = "")\n-        parser.add_option("-o", "--out",        dest = "outFileName",   action = "store",       type = "string", help = "output file name [default: <input>.fa_aln]", default = "")\n-        parser.add_option("-s", "--gapSize",    dest = "gapSize",       action = "store",       type = "int",    help = "size above which a gap is not penalized anymore [optional] [default: 50]", defaul'..b'elf.setGapOpenPenalty(options.gapOpen)\n-        self.setGapExtendPenalty(options.gapExtend)\n-        self.setDoClean(options.doClean)\n-        self.setVerbosity(options.verbosity)\n-\n-    def setFastaFileName(self, fastaFileName):\n-        self._fastaFileName = fastaFileName\n-        \n-    def setOutFileName(self, outFileName):\n-        if outFileName == "":\n-            self._outFileName = "%s.fa_aln" % self._fastaFileName\n-        else:\n-            self._outFileName = outFileName\n-        \n-    def setGapSize(self, gapSize):\n-        self._gapSize = gapSize\n-\n-    def setMismatchPenalty(self, mismatchPenalty):\n-        self._mismatchPenalty = mismatchPenalty\n-        \n-    def setGapOpenPenalty(self, gapOpenPenalty):\n-        self._gapOpenPenalty = gapOpenPenalty\n-        \n-    def setGapExtendPenalty(self, gapExtendPenalty):\n-        self._gapExtendPenalty = gapExtendPenalty\n-        \n-    def setDoClean(self, doClean):\n-        self._doClean = doClean\n-        \n-    def setVerbosity(self, verbosity):\n-        self._verbosity = verbosity\n-        \n-    def _checkOptions(self):\n-        if self._fastaFileName == "":\n-            self._logAndRaise("ERROR: Missing input fasta file name")\n-        if not FileUtils.isRessourceExists(self._fastaFileName):\n-            self._logAndRaise("ERROR: Input fasta file name %s doesn\'t exist." % self._fastaFileName)\n-            \n-    def _logAndRaise(self, errorMsg):\n-        self._log.error(errorMsg)\n-        raise Exception(errorMsg)\n-    \n-    def getMapCmd(self):\n-        cmd = "rpt_map"\n-        cmd += " %s.shortH" % self._fastaFileName\n-        cmd += " %i" % self._gapSize\n-        cmd += " %i" % self._mismatchPenalty\n-        cmd += " %i" % self._gapOpenPenalty\n-        cmd += " %i" % self._gapExtendPenalty\n-        cmd += " > %s.shortH.fa_aln" % self._fastaFileName\n-        return cmd\n-                    \n-    def run(self):\n-        LoggerFactory.setLevel(self._log, self._verbosity)\n-        self._checkOptions()\n-        self._log.info("START LaunchMap")\n-        self._log.debug("Fasta file name: %s" % self._fastaFileName)\n-        \n-        lInitHeaders = FastaUtils.dbHeaders(self._fastaFileName, self._verbosity - 1)\n-        \n-        csh = ChangeSequenceHeaders()\n-        csh.setInputFile(self._fastaFileName)\n-        csh.setFormat("fasta")\n-        csh.setStep(1)\n-        csh.setPrefix("seq")\n-        csh.setLinkFile("%s.shortHlink" % self._fastaFileName)\n-        csh.setOutputFile("%s.shortH" % self._fastaFileName)\n-        csh.setVerbosityLevel(self._verbosity - 1)\n-        csh.run()\n-        \n-        cmd = self.getMapCmd()\n-        process = subprocess.Popen(cmd, shell = True)\n-        self._log.debug("Running : %s" % cmd)\n-        process.communicate()\n-        if process.returncode != 0:\n-            self._logAndRaise("ERROR when launching \'%s\'" % cmd)\n-            \n-        csh.setInputFile("%s.shortH.fa_aln" % self._fastaFileName)\n-        csh.setFormat("fasta")\n-        csh.setStep(2)\n-        csh.setLinkFile("%s.shortHlink" % self._fastaFileName)\n-        csh.setOutputFile("%s.shortH.fa_aln.initH" % self._fastaFileName)\n-        csh.setVerbosityLevel(self._verbosity - 1)\n-        csh.run()\n-        \n-        absDB = AlignedBioseqDB("%s.shortH.fa_aln.initH" % self._fastaFileName)\n-        outFileHandler = open(self._outFileName, "w")\n-        for header in lInitHeaders:\n-            bs = absDB.fetch(header)\n-            bs.upCase()\n-            bs.write(outFileHandler)\n-        outFileHandler.close()\n-        if self._doClean:\n-            os.remove("%s.shortH" % self._fastaFileName)\n-            os.remove("%s.shortHlink" % self._fastaFileName)\n-            os.remove("%s.shortH.fa_aln" % self._fastaFileName)\n-            os.remove("%s.shortH.fa_aln.initH" % self._fastaFileName)\n-        self._log.info("END Launch")\n-\n-if __name__ == "__main__":\n-    iLaunch = LaunchMap()\n-    iLaunch.setAttributesFromCmdLine()\n-    iLaunch.run()        \n\\ No newline at end of file\n'
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/LaunchMatcher.py
--- a/commons/launcher/LaunchMatcher.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
b'@@ -1,168 +0,0 @@\n-#!/usr/bin/env python\n-\n-# Copyright INRA (Institut National de la Recherche Agronomique)\n-# http://www.inra.fr\n-# http://urgi.versailles.inra.fr\n-#\n-# This software is governed by the CeCILL license under French law and\n-# abiding by the rules of distribution of free software.  You can  use, \n-# modify and/ or redistribute the software under the terms of the CeCILL\n-# license as circulated by CEA, CNRS and INRIA at the following URL\n-# "http://www.cecill.info". \n-#\n-# As a counterpart to the access to the source code and  rights to copy,\n-# modify and redistribute granted by the license, users are provided only\n-# with a limited warranty  and the software\'s author,  the holder of the\n-# economic rights,  and the successive licensors  have only  limited\n-# liability. \n-#\n-# In this respect, the user\'s attention is drawn to the risks associated\n-# with loading,  using,  modifying and/or developing or reproducing the\n-# software by the user in light of its specific status of free software,\n-# that may mean  that it is complicated to manipulate,  and  that  also\n-# therefore means  that it is reserved for developers  and  experienced\n-# professionals having in-depth computer knowledge. Users are therefore\n-# encouraged to load and test the software\'s suitability as regards their\n-# requirements in conditions enabling the security of their systems and/or \n-# data to be ensured and,  more generally, to use and operate it in the \n-# same conditions as regards security. \n-#\n-# The fact that you are presently reading this means that you have had\n-# knowledge of the CeCILL license and that you accept its terms.\n-\n-from commons.core.LoggerFactory import LoggerFactory\n-from commons.core.utils.RepetOptionParser import RepetOptionParser\n-import subprocess\n-\n-LOG_DEPTH = "repet.tools"\n-\n-##Launch MATCHER\n-#\n-class LaunchMatcher(object):\n-\n-    def __init__(self, align="", queryFileName="", subjectFileName="", evalue="1e-10", doJoin=False, keepConflict=False, prefix="", doClean = False, verbosity = 0):\n-        self._alignFileName = align\n-        self._queryFileName = queryFileName\n-        self.setSubjectFileName(subjectFileName)\n-        self.setOutPrefix(prefix)\n-        self._doJoin = doJoin\n-        self._eValue = evalue\n-        self._keepConflict = keepConflict\n-        \n-        self._doClean = doClean\n-        self._verbosity = verbosity\n-        self._log = LoggerFactory.createLogger("%s.%s" % (LOG_DEPTH, self.__class__.__name__), self._verbosity)\n-        \n-    def setAttributesFromCmdLine(self):\n-        description = "Launch Matcher."\n-        epilog = "\\nExample 1: launch without verbosity and keep temporary files.\\n"\n-        epilog += "\\t$ python LaunchMatcher.py -a in.align -v 0"\n-        epilog += "\\n\\t"\n-        epilog += "\\nExample 2: launch with verbosity to have errors (level 1) and basic information (level 2), and delete temporary files.\\n"\n-        epilog += "\\t$ python LaunchMatcher.py -a in.align -q query.fa -s nr.fa -c -v 2"\n-        parser = RepetOptionParser(description = description, epilog = epilog)\n-        parser.add_option("-a", "--align",      dest = "align",         action = "store",       type = "string", help = "input align file name [compulsory] [format: align]",       default = "")\n-        parser.add_option("-q", "--query",      dest = "query",         action = "store",       type = "string", help = "query fasta file name [optional] [format: fasta]",         default = "")\n-        parser.add_option("-s", "--subject",    dest = "subject",       action = "store",       type = "string", help = "subject fasta file name [optional] [format: fasta]",       default = "")\n-        parser.add_option("-e", "--evalue",     dest = "evalue",        action = "store",       type = "string", help = "E-value filter [default: 1e-10]",                          default = "1e-10")\n-        parser.add_option("-j", "--join",       dest = "doJoin",        action = "store_true",                   help = "j'..b' "string", help = "output file prefix [default: align file name]",            default = "")\n-        parser.add_option("-c", "--clean",      dest = "doClean",       action = "store_true",                   help = "clean temporary files [default: False]",                   default = False)\n-        parser.add_option("-v", "--verbosity",  dest = "verbosity",     action = "store",       type = "int",    help = "verbosity [default: 1]",                                   default = 1)\n-        options = parser.parse_args()[0]\n-        self._setAttributesFromOptions(options)\n-        \n-    def _setAttributesFromOptions(self, options):\n-        self.setAlignFileName(options.align)\n-        self.setQueryFileName(options.query)\n-        self.setSubjectFileName(options.subject)\n-        self.setEvalue(options.evalue)\n-        self.setDoJoin(options.doJoin)\n-        self.setKeepConflicts(options.keepConflict)\n-        self.setOutPrefix(options.outPrefix)\n-        self.setDoClean(options.doClean)\n-        self.setVerbosity(options.verbosity)\n-        \n-    def setAlignFileName(self, alignFileName):\n-        self._alignFileName = alignFileName\n-        \n-    def setQueryFileName(self, queryFileName):\n-        self._queryFileName = queryFileName\n-        \n-    def setSubjectFileName(self, subjectFileName):\n-        self._subjectFileName = subjectFileName\n-        \n-    def setEvalue(self, evalue):\n-        self._eValue = evalue\n-        \n-    def setDoJoin(self, doJoin):\n-        self._doJoin = doJoin\n-        \n-    def setKeepConflicts(self, keepConflict):\n-        self._keepConflict = keepConflict\n-        \n-    def setOutPrefix(self, outPrefix):\n-        if outPrefix == "":\n-            self._outPrefix = self._alignFileName\n-        else:\n-            self._outPrefix = outPrefix\n-        \n-    def setDoClean(self, doClean):\n-        self._doClean = doClean\n-        \n-    def setVerbosity(self, verbosity):\n-        self._verbosity = verbosity\n-        \n-    def _checkOptions(self):\n-        if self._alignFileName == "":\n-            self._logAndRaise("ERROR: Missing input align file name")\n-        \n-    def _logAndRaise(self, errorMsg):\n-        self._log.error(errorMsg)\n-        raise Exception(errorMsg)\n-\n-    def _getMatcherCmd(self):\n-        lArgs = []\n-        lArgs.append("-m %s" % self._alignFileName)\n-        if self._queryFileName:\n-            lArgs.append("-q %s" % self._queryFileName)\n-        if self._subjectFileName:\n-            lArgs.append("-s %s" % self._subjectFileName)\n-        if self._doJoin:\n-            lArgs.append("-j")\n-        lArgs.append("-E %s" % self._eValue)\n-        lArgs.append("-B %s" % self._outPrefix)\n-        if self._keepConflict:\n-            lArgs.append("-a")\n-        lArgs.append("-v %i" % (self._verbosity - 1))\n-        return self._getSystemCommand("matcher", lArgs)\n-    \n-    def _getSystemCommand(self, prg, lArgs):\n-        systemCmd = prg \n-        for arg in lArgs:\n-            systemCmd += " " + arg\n-        return systemCmd\n-                    \n-    def run(self):\n-        LoggerFactory.setLevel(self._log, self._verbosity)\n-        self._checkOptions()\n-        self._log.info("START LaunchMatcher")\n-        self._log.debug("Align file name: %s" % self._alignFileName)\n-        self._log.debug("Query file name: %s" % self._queryFileName)\n-        self._log.debug("Subject file name: %s" % self._subjectFileName)\n-        #TODO: clean files\n-#        if self._doClean:\n-#            self._log.warning("Files will be cleaned")\n-        cmd = self._getMatcherCmd()\n-        process = subprocess.Popen(cmd, shell = True)\n-        self._log.debug("Running : %s" % cmd)\n-        process.communicate()\n-        if process.returncode != 0:\n-            self._logAndRaise("ERROR when launching \'%s\'" % cmd)\n-        self._log.info("END LaunchMatcher")\n-\n-if __name__ == "__main__":\n-    iLaunch = LaunchMatcher()\n-    iLaunch.setAttributesFromCmdLine()\n-    iLaunch.run()        \n\\ No newline at end of file\n'
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/LaunchMummerPlot.py
--- a/commons/launcher/LaunchMummerPlot.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,150 +0,0 @@
-#! /usr/bin/env python
-
-# Copyright INRA (Institut National de la Recherche Agronomique)
-# http://www.inra.fr
-# http://urgi.versailles.inra.fr
-#
-# This software is governed by the CeCILL license under French law and
-# abiding by the rules of distribution of free software.  You can  use, 
-# modify and/ or redistribute the software under the terms of the CeCILL
-# license as circulated by CEA, CNRS and INRIA at the following URL
-# "http://www.cecill.info". 
-#
-# As a counterpart to the access to the source code and  rights to copy,
-# modify and redistribute granted by the license, users are provided only
-# with a limited warranty  and the software's author,  the holder of the
-# economic rights,  and the successive licensors  have only  limited
-# liability. 
-#
-# In this respect, the user's attention is drawn to the risks associated
-# with loading,  using,  modifying and/or developing or reproducing the
-# software by the user in light of its specific status of free software,
-# that may mean  that it is complicated to manipulate,  and  that  also
-# therefore means  that it is reserved for developers  and  experienced
-# professionals having in-depth computer knowledge. Users are therefore
-# encouraged to load and test the software's suitability as regards their
-# requirements in conditions enabling the security of their systems and/or 
-# data to be ensured and,  more generally, to use and operate it in the 
-# same conditions as regards security. 
-#
-# The fact that you are presently reading this means that you have had
-# knowledge of the CeCILL license and that you accept its terms.
-
-from commons.core.checker.CheckerUtils import CheckerUtils
-from commons.core.utils.FileUtils import FileUtils
-from commons.core.utils.RepetOptionParser import RepetOptionParser
-import subprocess
-from commons.core.LoggerFactory import LoggerFactory
-import os
-import shutil
-  
-LOG_DEPTH = "repet.tools"  
-  
-class LaunchMummerPlot(object):
-
-    def __init__(self, inputFileName="", queryFileName="", refFileName ="", prefix = None, fat=False, filter=False,clean=False, verbosity=0):
-        self._inputFileName = inputFileName
-        self._queryFileName = queryFileName
-        self._refFileName = refFileName
-        self._prefix = prefix
-        self._fat = fat
-        self._filter = filter
-        self.doClean = clean
-        self.verbosity = verbosity
-        self._log = LoggerFactory.createLogger("%s.%s" % (LOG_DEPTH, self.__class__.__name__), self.verbosity)
-             
-    def setAttributesFromCmdLine(self):
-        description = "LaunchMummerPlot runs the MummerPlot program (part of the mummer package) ."    
-        parser = RepetOptionParser(description = description)
-        parser.add_option("-i", "--input", dest="inputFileName", default = None,  action="store", type="string", help="input file[mandatory] [format: delta]")      
-        parser.add_option("-q", "--Qfile", dest="queryFileName", default = None,  action="store", type="string", help="Plot an ordered set of reference sequences from Qfile [optional] [format: fasta]")
-        parser.add_option("-r", "--Rfile", dest="refFileName", default = None,  action="store", type="string", help="Plot an ordered set of reference sequences from Rfile [optional] [format: fasta]")
-        parser.add_option("-p", "--prefix", dest="prefix", default = None,  action="store", type="string", help="prefix name [mandatory]")
-        parser.add_option("-o","--fat", dest="fat",action="store_true", help="Layout sequences using fattest alignment only[optional] ")
-        parser.add_option("-s","--filter", dest="filter",action="store_true", help="Only display .delta alignments which represent the 'best' hit [optional] ")      
-        parser.add_option("-c", "--clean", dest = "clean", help = "clean temporary files", default = False, action="store_true")  
-        parser.add_option("-v", "--verbosity", dest="verbosity", default = 0,  action="store", type="int", help="verbosity [optional] ")
-        
-        (self._options, args) = parser.parse_args()
-        self._setAttributesFromOptions(self._options)
-
-    def _setAttributesFromOptions(self, options):
-        self._inputFileName = options.inputFileName
-        self._queryFileName = options.queryFileName
-        self._refFileName = options.refFileName
-        self._prefix = options.prefix
-        self._fat = options.fat
-        self._filter = options.filter
-        self.verbosity = options.verbosity
-        
-    def _logAndRaise(self, errorMsg):
-        self._log.error(errorMsg)
-        raise Exception(errorMsg)
-            
-    def checkOptions(self):  
-        if self._inputFileName != "":
-            if not FileUtils.isRessourceExists(self._inputFileName):
-                self._logAndRaise("ERROR: Query file: %s does not exist!" % self._inputFileName)
-        else:
-            self._logAndRaise("ERROR: No specified --query option!")     
-        
-        if self._queryFileName != "":
-            if not FileUtils.isRessourceExists(self._queryFileName):
-                self._logAndRaise("ERROR: Query file: %s does not exist!" % self._queryFileName)
-        
-        if self._refFileName != "":
-            if not FileUtils.isRessourceExists(self._refFileName):
-                self._logAndRaise("ERROR: Ref file does not exist!"% self._refFileName)
-                
-    def clean(self):
-        try:
-            os.remove("%s.filter" % self._prefix)
-        except Exception as inst: 
-            self._log.error(inst)
-        try:
-            os.remove("%s.fplot" % self._prefix)
-        except Exception as inst: 
-            self._log.error(inst)
-        try:
-            os.remove("%s.rplot" % self._prefix)
-        except Exception as inst: 
-            self._log.error(inst)
-                                
-    def run(self):
-        if not CheckerUtils.isExecutableInUserPath("mummerplot") :
-            self._logAndRaise("ERROR: mummerplot must be in your path")
-        self.checkOptions()
-        
-        ref=""
-        if self._refFileName != "":
-            ref = "-R %s"  % self._refFileName
-           
-        query=""
-        if self._queryFileName != "":
-            query = "-Q %s"  % self._queryFileName
-           
-        fat = ""
-        if self._fat:
-            fat =  "--fat"
-            
-        filter = ""
-        if self._filter:
-            filter = "-f" 
-            
-        prefix = ""
-        if self._prefix is not None:
-            prefix = "--prefix=%s" %(self._prefix)
-            
-        cmd = "mummerplot %s %s %s %s %s %s --png" % (self._inputFileName, prefix, ref, query, fat, filter)
-        self._log.debug("Running mummerplot with following commands : %s" %cmd)
-        cmd = cmd.split()         
-        process = subprocess.Popen(cmd)
-        process.wait()
-        
-        self.clean()
-        return process.returncode
-            
-if __name__ == "__main__":
-    iLaunchNucmer = LaunchMummerPlot()
-    iLaunchNucmer.setAttributesFromCmdLine()
-    iLaunchNucmer.run()
\ No newline at end of file
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/LaunchNucmer.py
--- a/commons/launcher/LaunchNucmer.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
b'@@ -1,158 +0,0 @@\n-#! /usr/bin/env python\n-\n-# Copyright INRA (Institut National de la Recherche Agronomique)\n-# http://www.inra.fr\n-# http://urgi.versailles.inra.fr\n-#\n-# This software is governed by the CeCILL license under French law and\n-# abiding by the rules of distribution of free software.  You can  use, \n-# modify and/ or redistribute the software under the terms of the CeCILL\n-# license as circulated by CEA, CNRS and INRIA at the following URL\n-# "http://www.cecill.info". \n-#\n-# As a counterpart to the access to the source code and  rights to copy,\n-# modify and redistribute granted by the license, users are provided only\n-# with a limited warranty  and the software\'s author,  the holder of the\n-# economic rights,  and the successive licensors  have only  limited\n-# liability. \n-#\n-# In this respect, the user\'s attention is drawn to the risks associated\n-# with loading,  using,  modifying and/or developing or reproducing the\n-# software by the user in light of its specific status of free software,\n-# that may mean  that it is complicated to manipulate,  and  that  also\n-# therefore means  that it is reserved for developers  and  experienced\n-# professionals having in-depth computer knowledge. Users are therefore\n-# encouraged to load and test the software\'s suitability as regards their\n-# requirements in conditions enabling the security of their systems and/or \n-# data to be ensured and,  more generally, to use and operate it in the \n-# same conditions as regards security. \n-#\n-# The fact that you are presently reading this means that you have had\n-# knowledge of the CeCILL license and that you accept its terms.\n-\n-from commons.core.checker.CheckerUtils import CheckerUtils\n-from commons.core.utils.FileUtils import FileUtils\n-from commons.core.utils.RepetOptionParser import RepetOptionParser\n-import subprocess\n-from commons.core.LoggerFactory import LoggerFactory\n-import os\n-  \n-LOG_DEPTH = "repet.tools"  \n-  \n-class LaunchNucmer(object):\n-\n-    def __init__(self,queryFileName="", refFileName ="", prefix = None, genCoords=False, showCoords = False, mum=False, maxGaps=90, minMatch=20, nooptimize=False,mincluster=65, minIdentity=50, minLength=100, verbosity=0):\n-        self._queryFileName = queryFileName\n-        self._refFileName = refFileName\n-        self._prefix = prefix\n-        self._genCoords = genCoords\n-        self._showCoords = showCoords\n-        self._mum = mum\n-        self._maxgaps = maxGaps\n-        self._minMatch = minMatch\n-        self._nooptimize = nooptimize\n-        self._mincluster = mincluster\n-        self._minIdentity = minIdentity\n-        self._minLength = minLength\n-        self.verbosity = verbosity\n-        self._log = LoggerFactory.createLogger("%s.%s" % (LOG_DEPTH, self.__class__.__name__), self.verbosity)\n-        \n-    def setMincluster(self, value):\n-        self._mincluster = value\n-    def getMincluster(self):\n-        return self._mincluster\n-    \n-    mincluster = property(getMincluster, setMincluster)\n-         \n-    def setAttributesFromCmdLine(self):\n-        description = "LaunchNucmer runs the Nucmer program (part of the mummer package) ."    \n-        parser = RepetOptionParser(description = description)\n-        parser.add_option("-q", "--query", dest="queryFileName", default = "",  action="store", type="string", help="input query file [compulsory] [format: fasta]")\n-        parser.add_option("-r", "--ref", dest="refFileName", default = "",  action="store", type="string", help="input ref file [compulsory] [format: fasta]")\n-        parser.add_option("-p", "--prefix", dest="prefix", default = None,  action="store", type="string", help="prefix name [optional]")\n-        parser.add_option("-o","--gencoords", dest="genCoords",action="store_true", help="generate coords file with minimal option (show-coords -r) [optional] ")\n-        parser.add_option("-s","--showcoords", dest="showCoords",action="store_true", help="generate coords file with: show-coords -r -c -l -d -I 50 -L 10'..b'ize", dest="nooptimize", action="store_true", help="nooptimize (default --optimize) [optional] ")  \n-        parser.add_option("-j", "--mincluster", dest="mincluster", default = 65,  action="store", type="int", help="Minimum length of a cluster of matches (default 65) [optional] ")\n-        \n-        parser.add_option("-i", "--minIdentity", dest="minIdentity", default = 50,  action="store", type="int", help="Minimum identity for show_coords (default 50) [optional] ")\n-        parser.add_option("-u", "--minLength", dest="minLength", default = 100,  action="store", type="int", help="Minimum alignment length for show_coords (default 100) [optional] ")\n-        parser.add_option("-v", "--verbosity", dest="verbosity", default = 0,  action="store", type="int", help="verbosity [optional] ")\n-        \n-        (self._options, args) = parser.parse_args()\n-        self._setAttributesFromOptions(self._options)\n-\n-    def _setAttributesFromOptions(self, options):\n-        self._queryFileName = options.queryFileName\n-        self._refFileName = options.refFileName\n-        self._prefix = options.prefix\n-        self._genCoords = options.genCoords\n-        self._showCoords = options.showCoords\n-        self._mum = options.mum  \n-        self._maxgaps = options.maxgaps\n-        self._minMatch = options.minMatch\n-        self._nooptimize =  options.nooptimize\n-        self._mincluster = options.mincluster\n-        \n-        self._minIdentity = options.minIdentity\n-        self._minLength = options.minLength\n-        \n-        self.verbosity = options.verbosity\n-        \n-    def _logAndRaise(self, errorMsg):\n-        self._log.error(errorMsg)\n-        raise Exception(errorMsg)\n-            \n-    def checkOptions(self):       \n-        if self._queryFileName != "":\n-            if not FileUtils.isRessourceExists(self._queryFileName):\n-                self._logAndRaise("ERROR: Query file: %s does not exist!" % self._queryFileName)\n-        else:\n-            self._logAndRaise("ERROR: No specified --query option!")\n-        \n-        if self._refFileName != "":\n-            if not FileUtils.isRessourceExists(self._refFileName):\n-                self._logAndRaise("ERROR: Ref file does not exist!"% self._refFileName)\n-        else:\n-            self._logAndRaise("ERROR: No specified --ref option!")\n-                                \n-    def run(self):\n-        LoggerFactory.setLevel(self._log, self.verbosity)\n-        if not CheckerUtils.isExecutableInUserPath("nucmer") :\n-            self._logAndRaise("ERROR: nucmer must be in your path")\n-        self.checkOptions()\n-        \n-        genCoords = ""\n-        if self._genCoords:\n-            genCoords = "-o"     \n-        mum = ""\n-        if self._mum:\n-            mum =  "--mum"\n-        nooptimize = "--optimize"\n-        if self._nooptimize:\n-            nooptimize = "--nooptimize" \n-        prefix = ""\n-        if self._prefix is not None:\n-            prefix = "--prefix=%s" %(self._prefix) \n-        cmd = "nucmer %s %s %s %s %s -g=%d -l=%d %s -c=%d" % (self._refFileName,self._queryFileName, prefix, genCoords, mum, self._maxgaps, self._minMatch, nooptimize, self._mincluster)\n-        self._log.debug("Running nucmer with following commands : %s" %cmd)\n-        cmd = cmd.split()\n-        process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)\n-        process.wait()\n-        \n-        if self._showCoords:\n-            #use of os.system because redirect on process is broken in python < 3.0\n-            cmd = "show-coords -r -c -l -d -I %d -L %d -T %s.delta > %s.coords" % (self._minIdentity, self._minLength, self._prefix, self._prefix)\n-            self._log.debug("Running show-coords with following commands : %s" %cmd)\n-            os.system(cmd)\n-\n-            \n-        return process.returncode\n-            \n-if __name__ == "__main__":\n-    iLaunchNucmer = LaunchNucmer()\n-    iLaunchNucmer.setAttributesFromCmdLine()\n-    iLaunchNucmer.run()\n\\ No newline at end of file\n'
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/LaunchPhyML.py
--- a/commons/launcher/LaunchPhyML.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
b'@@ -1,177 +0,0 @@\n-#!/usr/bin/env python\n-\n-# Copyright INRA (Institut National de la Recherche Agronomique)\n-# http://www.inra.fr\n-# http://urgi.versailles.inra.fr\n-#\n-# This software is governed by the CeCILL license under French law and\n-# abiding by the rules of distribution of free software.  You can  use, \n-# modify and/ or redistribute the software under the terms of the CeCILL\n-# license as circulated by CEA, CNRS and INRIA at the following URL\n-# "http://www.cecill.info". \n-#\n-# As a counterpart to the access to the source code and  rights to copy,\n-# modify and redistribute granted by the license, users are provided only\n-# with a limited warranty  and the software\'s author,  the holder of the\n-# economic rights,  and the successive licensors  have only  limited\n-# liability. \n-#\n-# In this respect, the user\'s attention is drawn to the risks associated\n-# with loading,  using,  modifying and/or developing or reproducing the\n-# software by the user in light of its specific status of free software,\n-# that may mean  that it is complicated to manipulate,  and  that  also\n-# therefore means  that it is reserved for developers  and  experienced\n-# professionals having in-depth computer knowledge. Users are therefore\n-# encouraged to load and test the software\'s suitability as regards their\n-# requirements in conditions enabling the security of their systems and/or \n-# data to be ensured and,  more generally, to use and operate it in the \n-# same conditions as regards security. \n-#\n-# The fact that you are presently reading this means that you have had\n-# knowledge of the CeCILL license and that you accept its terms.\n-\n-from commons.core.LoggerFactory import LoggerFactory\n-from commons.core.utils.RepetOptionParser import RepetOptionParser\n-from commons.tools.ChangeSequenceHeaders import ChangeSequenceHeaders\n-import subprocess\n-import os\n-from commons.core.seq.Bioseq import Bioseq\n-import shutil\n-\n-LOG_DEPTH = "repet.core.launchers"\n-\n-\n-\n-class LaunchPhyML(object):\n-    """\n-    Launch \'PhyML\'\n-    """\n-    def __init__(self, inputFileName="", outFileName="",dataType= "nt", interleavedFormat= True, nbDataSets=1, nbBootDataSets=0, substModel="HKY85", ratioTsTv=4.0, propInvSites= 0.0, nbCat=1, gammaParam=1.0, startTree="BIONJ", paramOptimisation = "tlr", clean=False, verbosity=3 ):\n-        self.inputFileName = inputFileName\n-        self.outFileName=outFileName\n-        self.dataType = dataType                    #"nt or aa"\n-        self._setSeqFormat(interleavedFormat)       #if False -q"\n-        self.nbDataSets = nbDataSets\n-        self.nbBootDataSets = nbBootDataSets\n-        self.substModel = substModel\n-        self.ratioTsTv = ratioTsTv\n-        self.propInvSites = propInvSites            # propInvSites="e" replaced by 0.0; should be in [0-1]\n-        self.nbCat = nbCat                          # Number of categories less than four or higher than eight are not recommended.\n-        self.gammaParam = gammaParam\n-        self.startTree = startTree                  #by default is BIONJ used reformatedInputFileName+"_phyml_tree.txt" instead\n-        self.paramOptimisation = paramOptimisation  # used instead of self.optTopology="y", self.optBranchRate="y" \n-                                                    #This option focuses on specific parameter optimisation.\n-                                                    #tlr : tree topology (t), branch length (l) and rate parameters (r) are optimised.\n-                                                    #tl  : tree topology and branch length are optimised.\n-                                                    #lr  : branch length and rate parameters are optimised.\n-                                                    #l   : branch length are optimised.\n-                                                    #r   : rate parameters are optimised.\n-                                                    #n   : no parameter is optimised.\n-\n-        self._clean = clean\n-        self._v'..b'ns(options)\n-        \n-    def _setAttributesFromOptions(self, options):\n-        self.inputFileName = options.inputFileName\n-        self.setOutFileName = options.outFileName\n-        self._verbosity = options.verbosity\n-\n-    def _checkOptions(self):\n-        if self.inputFileName == "":\n-            self._logAndRaise("ERROR: Missing input file name")\n-    \n-        if self.outFileName == "":\n-            self.outFileName = "%s_phyml.newick" % (self.inputFileName)\n-            \n-    def _logAndRaise(self, errorMsg):\n-        self._log.error(errorMsg)\n-        raise Exception(errorMsg)\n-         \n-    def _shortenHeaders(self):\n-        self.csh = ChangeSequenceHeaders()\n-        self.csh.setInputFile(self.inputFileName)\n-        self.csh.setFormat("fasta")\n-        self.csh.setStep(1)\n-        self.csh.setPrefix("seq")\n-        self.csh.setLinkFile(self.inputFileName+".shortHlink")\n-        self.csh.setOutputFile(self.inputFileName+".shortH")\n-        self.csh.setVerbosityLevel(self._verbosity-1)\n-        self.csh.run()\n-        self.shortInputFileName = self.inputFileName+".shortH" \n-        \n-    def _renameHeaders(self):\n-        self.csh.setInputFile(self.phyml_tree)\n-        self.csh.setFormat("newick")\n-        self.csh.setStep(2)\n-        self.csh.setLinkFile(self.inputFileName+".shortHlink" )\n-        self.csh.setOutputFile(self.outFileName)\n-        self.csh.setVerbosityLevel(self._verbosity-1)\n-        self.csh.run()\n-          \n-    def run(self):\n-        LoggerFactory.setLevel(self._log, self._verbosity)\n-        self._checkOptions()\n-        self._log.info("START LaunchPhyML")\n-        self._log.debug("building a multiple alignment from \'%s\'..." % ( self.inputFileName))\n-        \n-        inputFileName = "%s/%s" % (os.getcwd(), os.path.basename(self.inputFileName))\n-        if not os.path.exists(inputFileName):\n-            os.symlink(self.inputFileName, inputFileName)\n-        self.inputFileName = inputFileName\n-        \n-        self._shortenHeaders()\n-\n-        cmd = "sreformat phylip %s" % (self.shortInputFileName)\n-        \n-        with open (self.reformatedInputFileName, "w") as fPhylip :\n-            \n-            process = subprocess.Popen(cmd.split(\' \'), stdout= fPhylip , stderr=subprocess.PIPE)\n-            self._log.debug("Running : %s" % cmd)\n-            output = process.communicate()\n-            self._log.debug("Output:\\n%s" % output[0])\n-            if process.returncode != 0:\n-                self._logAndRaise("ERROR when launching \'%s\'" % cmd)\n-        \n-        self.reformatedInputFileName = "%s.phylip" % self.shortInputFileName\n-        self.phyml_tree = "%s_phyml_tree.txt" %self.reformatedInputFileName \n-        cpyPhyml_tree = "%s_cpy" %self.phyml_tree\n-        shutil.copyfile(self.phyml_tree,cpyPhyml_tree)\n-                          \n-        cmd = "phyml -i %s -d %s%s -n %d -b %d -m %s -t %f -v %f -c %d -a %f -u %s -o %s" % (self.reformatedInputFileName, self.dataType, self.seqFormat, self.nbDataSets,self.nbBootDataSets,self.substModel, self.ratioTsTv, self.propInvSites,self.nbCat,self.gammaParam, cpyPhyml_tree , self.paramOptimisation )\n-        print cmd    \n-        process = subprocess.Popen(cmd.split(\' \'), stdout=subprocess.PIPE, stderr=subprocess.PIPE)\n-        self._log.debug("Running : %s" % cmd)\n-        output = process.communicate()\n-        self._log.debug("Output:\\n%s" % output[0])\n-        if process.returncode != 0:\n-            self._logAndRaise("ERROR when launching \'%s\'" % cmd)\n-        \n-        self._renameHeaders()\n-        \n-        if self._clean:\n-            for f in [ self.shortInputFileName, self.inputFileName+".shortHlink", self.inputFileName+".shortH.phylip",self.inputFileName+".shortH.phylip_phyml_lk.txt", self.phyml_tree ]:\n-                os.remove(f)\n-            os.system( "mv %s.phylip_phyml_stat.txt %s_phyml.txt" % ( self.shortInputFileName, self.inputFileName ) )\n-        \n-        self._log.info("Finished running LaunchPhyML")\n-        \n-        \n'
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/LaunchPromer.py
--- a/commons/launcher/LaunchPromer.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,147 +0,0 @@
-#! /usr/bin/env python
-
-# Copyright INRA (Institut National de la Recherche Agronomique)
-# http://www.inra.fr
-# http://urgi.versailles.inra.fr
-#
-# This software is governed by the CeCILL license under French law and
-# abiding by the rules of distribution of free software.  You can  use, 
-# modify and/ or redistribute the software under the terms of the CeCILL
-# license as circulated by CEA, CNRS and INRIA at the following URL
-# "http://www.cecill.info". 
-#
-# As a counterpart to the access to the source code and  rights to copy,
-# modify and redistribute granted by the license, users are provided only
-# with a limited warranty  and the software's author,  the holder of the
-# economic rights,  and the successive licensors  have only  limited
-# liability. 
-#
-# In this respect, the user's attention is drawn to the risks associated
-# with loading,  using,  modifying and/or developing or reproducing the
-# software by the user in light of its specific status of free software,
-# that may mean  that it is complicated to manipulate,  and  that  also
-# therefore means  that it is reserved for developers  and  experienced
-# professionals having in-depth computer knowledge. Users are therefore
-# encouraged to load and test the software's suitability as regards their
-# requirements in conditions enabling the security of their systems and/or 
-# data to be ensured and,  more generally, to use and operate it in the 
-# same conditions as regards security. 
-#
-# The fact that you are presently reading this means that you have had
-# knowledge of the CeCILL license and that you accept its terms.
-
-from commons.core.checker.CheckerUtils import CheckerUtils
-from commons.core.utils.FileUtils import FileUtils
-from commons.core.utils.RepetOptionParser import RepetOptionParser
-import subprocess
-from commons.core.LoggerFactory import LoggerFactory
-import os
-  
-LOG_DEPTH = "repet.tools"  
-  
-class LaunchPromer(object):
-
-    def __init__(self,queryFileName="", refFileName ="", prefix = None, genCoords=False, showCoords = False, mum=False, maxGaps=30, minMatch=6, nooptimize=False,mincluster=20, verbosity=0):
-        self._queryFileName = queryFileName
-        self._refFileName = refFileName
-        self._prefix = prefix
-        self._genCoords = genCoords
-        self._showCoords = showCoords
-        self._mum = mum
-        self._maxgaps = maxGaps
-        self._minMatch = minMatch
-        self._nooptimize = nooptimize
-        self._mincluster = mincluster
-        self.verbosity = verbosity
-        self._log = LoggerFactory.createLogger("%s.%s" % (LOG_DEPTH, self.__class__.__name__), self.verbosity)
-        
-    def setMincluster(self, value):
-        self._mincluster = value
-    def getMincluster(self):
-        return self._mincluster
-    
-    mincluster = property(getMincluster, setMincluster)
-         
-    def setAttributesFromCmdLine(self):
-        description = "LaunchPromer runs the Promer program (part of the mummer package) ."    
-        parser = RepetOptionParser(description = description)
-        parser.add_option("-q", "--query", dest="queryFileName", default = "",  action="store", type="string", help="input query file [compulsory] [format: fasta]")
-        parser.add_option("-r", "--ref", dest="refFileName", default = "",  action="store", type="string", help="input ref file [compulsory] [format: fasta]")
-        parser.add_option("-p", "--prefix", dest="prefix", default = None,  action="store", type="string", help="prefix name [optional]")
-        parser.add_option("-o","--gencoords", dest="genCoords",action="store_true", help="generate coords file with minimal option (show-coords -r) [optional] ")
-        parser.add_option("-s","--showcoords", dest="showCoords",action="store_true", help="generate coords file with: show-coords -r -c -l -d -I 50 -L 100 -T [optional] ")        
-        parser.add_option("-m", "--mum", dest="mum",  action="store_true", help="Use anchor matches that are unique in both the reference and query [optional] ")      
-        parser.add_option("-g", "--maxgaps", dest="maxgaps", default = 30,  action="store", type="int", help="Maximum gap between two adjacent matches in a cluster (default 30) [optional] ")
-        parser.add_option("-l", "--minmatch", dest="minMatch", default = 6,  action="store", type="int", help="Minimum length of an maximal exact match (default 6) [optional] ")
-        parser.add_option("-n", "--nooptimize", dest="nooptimize", action="store_true", help="nooptimize (default --optimize) [optional] ")  
-        parser.add_option("-j", "--mincluster", dest="mincluster", default = 20,  action="store", type="int", help="Minimum length of a cluster of matches (default 20) [optional] ")
-        parser.add_option("-v", "--verbosity", dest="verbosity", default = 0,  action="store", type="int", help="verbosity [optional] ")
-        
-        (self._options, args) = parser.parse_args()
-        self._setAttributesFromOptions(self._options)
-
-    def _setAttributesFromOptions(self, options):
-        self._queryFileName = options.queryFileName
-        self._refFileName = options.refFileName
-        self._prefix = options.prefix
-        self._genCoords = options.genCoords
-        self._showCoords = options.showCoords
-        self._mum = options.mum  
-        self._maxgaps = options.maxgaps
-        self._minMatch = options.minMatch
-        self._nooptimize =  options.nooptimize
-        self._mincluster = options.mincluster
-        self.verbosity = options.verbosity
-        
-    def _logAndRaise(self, errorMsg):
-        self._log.error(errorMsg)
-        raise Exception(errorMsg)
-            
-    def checkOptions(self):       
-        if self._queryFileName != "":
-            if not FileUtils.isRessourceExists(self._queryFileName):
-                self._logAndRaise("ERROR: Query file: %s does not exist!" % self._queryFileName)
-        else:
-            self._logAndRaise("ERROR: No specified --query option!")
-        
-        if self._refFileName != "":
-            if not FileUtils.isRessourceExists(self._refFileName):
-                self._logAndRaise("ERROR: Ref file does not exist!"% self._refFileName)
-        else:
-            self._logAndRaise("ERROR: No specified --ref option!")
-                                
-    def run(self):
-        if not CheckerUtils.isExecutableInUserPath("promer") :
-            self._logAndRaise("ERROR: promer must be in your path")
-        self.checkOptions()
-        
-        genCoords = ""
-        if self._genCoords:
-            genCoords = "-o"     
-        mum = ""
-        if self._mum:
-            mum =  "--mum"
-        nooptimize = "--optimize"
-        if self._nooptimize:
-            nooptimize = "--nooptimize" 
-        prefix = ""
-        if self._prefix is not None:
-            prefix = "--prefix=%s" %(self._prefix)
-            
-        cmd = "promer %s %s %s %s %s -g=%d -l=%d %s -c=%d" % (self._refFileName,self._queryFileName, prefix, genCoords, mum, self._maxgaps, self._minMatch, nooptimize, self._mincluster)
-        self._log.debug("Running promer with following commands : %s" %cmd)
-        cmd = cmd.split()         
-        process = subprocess.Popen(cmd)
-        process.wait()
-        
-        if self._showCoords:
-            #use of os.system because redirect on process is broken in python < 3.0
-            cmd = "show-coords -r -c -l -d -I 50 -L 100 -T %s.delta > %s.coords" % (self._prefix, self._prefix)
-            os.system(cmd)
-
-        return process.returncode
-            
-if __name__ == "__main__":
-    iLaunchPromer = LaunchPromer()
-    iLaunchPromer.setAttributesFromCmdLine()
-    iLaunchPromer.run()
\ No newline at end of file
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/LaunchRefAlign.py
--- a/commons/launcher/LaunchRefAlign.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
b'@@ -1,208 +0,0 @@\n-#!/usr/bin/env python\n-\n-# Copyright INRA (Institut National de la Recherche Agronomique)\n-# http://www.inra.fr\n-# http://urgi.versailles.inra.fr\n-#\n-# This software is governed by the CeCILL license under French law and\n-# abiding by the rules of distribution of free software.  You can  use, \n-# modify and/ or redistribute the software under the terms of the CeCILL\n-# license as circulated by CEA, CNRS and INRIA at the following URL\n-# "http://www.cecill.info". \n-#\n-# As a counterpart to the access to the source code and  rights to copy,\n-# modify and redistribute granted by the license, users are provided only\n-# with a limited warranty  and the software\'s author,  the holder of the\n-# economic rights,  and the successive licensors  have only  limited\n-# liability. \n-#\n-# In this respect, the user\'s attention is drawn to the risks associated\n-# with loading,  using,  modifying and/or developing or reproducing the\n-# software by the user in light of its specific status of free software,\n-# that may mean  that it is complicated to manipulate,  and  that  also\n-# therefore means  that it is reserved for developers  and  experienced\n-# professionals having in-depth computer knowledge. Users are therefore\n-# encouraged to load and test the software\'s suitability as regards their\n-# requirements in conditions enabling the security of their systems and/or \n-# data to be ensured and,  more generally, to use and operate it in the \n-# same conditions as regards security. \n-#\n-# The fact that you are presently reading this means that you have had\n-# knowledge of the CeCILL license and that you accept its terms.\n-\n-from commons.core.LoggerFactory import LoggerFactory\n-from commons.core.utils.RepetOptionParser import RepetOptionParser\n-from commons.core.checker.ConfigChecker import ConfigRules\n-from commons.core.checker.ConfigChecker import ConfigChecker\n-import subprocess\n-import os\n-from commons.core.seq.Bioseq import Bioseq\n-\n-LOG_DEPTH = "repet.core.launchers"\n-\n-from commons.core.seq.BioseqDB import BioseqDB\n-from commons.tools.ChangeSequenceHeaders import ChangeSequenceHeaders\n-\n-\n-class LaunchRefAlign(object):\n-    """\n-    Launch \'refalign\' to build a master-slave multiple sequence alignment.\n-    """\n-    def __init__(self, inputFileName="", outFileName="", gapSize=10, match=10, mismatch=8, gapOpen=16, gapExtend=4, refseqName="", keepRefseq =False, verbosity=3 ):\n-        self.inputFileName = inputFileName\n-        self.outFileName=outFileName\n-        self.gapSize = gapSize\n-        self.match = match\n-        self.mismatch = mismatch\n-        self.gapOpen = gapOpen\n-        self.gapExtend = gapExtend\n-        self.gapExtend = gapExtend\n-        self.refseqName = refseqName\n-        self.keepRefseq = keepRefseq\n-        self._verbosity = verbosity\n-        self._log = LoggerFactory.createLogger("%s.%s" % (LOG_DEPTH, self.__class__.__name__), self._verbosity)\n-        \n-    def setAttributesFromCmdLine(self):\n-        description = "usage: LaunchRefalign.py [ options ]"\n-        epilog = "\\n -h: this help\\n"\n-        epilog += "\\t -i: name of the input file (refseq is first, format=\'fasta\')"\n-        epilog += "\\t -r: keep the reference sequence"\n-        epilog += "\\t -o: name of the output file (default=inFileName+\'.fa_aln\')"\n-        epilog += "\\t -v: verbosity (default=0)"\n-        epilog += "\\n\\t"\n-        parser = RepetOptionParser(description = description, epilog = epilog)\n-        parser.add_option("-i", "--fasta",      dest = "inputFileName", action = "store",       type = "string", help = "input fasta file name [compulsory] [format: fasta]", default = "")\n-        parser.add_option("-o", "--out",        dest = "outFileName",   action = "store",       type = "string", help = "output file name [default: <input>.out]", default = "")\n-        parser.add_option("-r", "--keepRefseq", dest = "keepRefseq",    action = "store_true",                   help = "keep reference sequence [optional] [default: Fals'..b'rs(self):\n-        self.csh = ChangeSequenceHeaders()\n-        self.csh.setInputFile(self.inputFileName)\n-        self.csh.setFormat("fasta")\n-        self.csh.setStep(1)\n-        self.csh.setPrefix("seq")\n-        self.csh.setLinkFile(self.inputFileName+".shortHlink")\n-        self.csh.setOutputFile(self.inputFileName+".shortH")\n-        self.csh.setVerbosityLevel(self._verbosity-1)\n-        self.csh.run()\n-        \n-        bsDB = BioseqDB(self.inputFileName+".shortH")\n-        bsDB.upCase()\n-        bsDB.save(self.inputFileName+".shortHtmp")\n-        del bsDB\n-        os.rename(self.inputFileName+".shortHtmp", self.inputFileName+".shortH")\n-        \n-    def _renameHeaders(self):\n-        self.csh.setInputFile(self.inputFileName+".shortH.fa_aln")\n-        self.csh.setFormat("fasta")\n-        self.csh.setStep(2)\n-        self.csh.setLinkFile(self.inputFileName+".shortHlink" )\n-        self.csh.setOutputFile(self.outFileName)\n-        self.csh.setVerbosityLevel(self._verbosity-1)\n-        self.csh.run()\n-          \n-    def run(self):\n-        LoggerFactory.setLevel(self._log, self._verbosity)\n-        self._checkOptions()\n-        self._log.info("START LaunchRefAlign")\n-        self._log.debug("building a multiple alignment from \'%s\'..." % ( self.inputFileName))\n-        \n-        inputFileName = "%s/%s" % (os.getcwd(), os.path.basename(self.inputFileName))\n-        if not os.path.exists(inputFileName):\n-            os.symlink(self.inputFileName, inputFileName)\n-        self.inputFileName = inputFileName\n-        \n-        self._shortenHeaders()\n-        if self.keepRefseq:\n-            self.refseqName="seq1"\n-        self._prepareRefAlign()\n-        \n-        if self._numseq > 1:\n-            cmd = "refalign %s %s -m %d -l %d -d %d -g %d -e %d" % (self.refFileName, self.cpyFileName, self.match, self.gapSize, self.mismatch, self.gapOpen, self.gapExtend)\n-            \n-            process = subprocess.Popen(cmd.split(\' \'), stdout=subprocess.PIPE, stderr=subprocess.PIPE)\n-            self._log.debug("Running : %s" % cmd)\n-            output = process.communicate()\n-            self._log.debug("Output:\\n%s" % output[0])\n-            if process.returncode != 0:\n-                self._logAndRaise("ERROR when launching \'%s\'" % cmd)\n-            refseqNameParam = ""\n-            if self.refseqName != "":\n-                refseqNameParam = "-r %s " % (self.refseqName)\n-            outFileName = self.inputFileName+".shortH.fa_aln"\n-            #self.cpyFileName = os.path.join(os.getcwd(),os.path.basename(self.cpyFileName))\n-            \n-            self._log.info("Copy file path %s " % self.cpyFileName)\n-            print("Copy file path %s " % self.cpyFileName)\n-            cmd = "refalign2fasta.py -i %s.aligner %s-g d -o %s -v 1" % (self.cpyFileName, refseqNameParam, outFileName)\n-            self._log.debug("Running : %s" % cmd)\n-            process = subprocess.Popen(cmd.split(\' \'), stdout=subprocess.PIPE, stderr=subprocess.PIPE)\n-            output = process.communicate()\n-            self._log.debug("Output:\\n%s" % output[0])\n-            \n-            if process.returncode != 0:\n-                self._logAndRaise("ERROR when launching \'%s\'" % cmd)\n-                \n-            cmd = "rm -f "+ self.refFileName + " " + self.cpyFileName + " " + self.cpyFileName + ".aligner " + self.cpyFileName + ".oriented " + self.cpyFileName + ".refalign.stat"\n-            os.system(cmd)\n-            \n-        else:\n-            self._logAndRaise("Only one sequence available")\n-            cmd = "echo empty"\n-            \n-        self._renameHeaders()\n-        \n-        for fileName in [self.inputFileName + ".shortH", self.inputFileName + ".shortHlink", self.inputFileName + ".shortH.fa_aln"]:\n-            os.remove(fileName)\n-        self._log.info("END LaunchRefAlign")\n-        return 0\n-        \n-\n-if __name__ == "__main__":\n-    iLaunchRefAlign = LaunchRefAlign()\n-    iLaunchRefAlign.setAttributesFromCmdLine()\n-    iLaunchRefAlign.run()\n'
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/LaunchRefalign_old.py
--- a/commons/launcher/LaunchRefalign_old.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,105 +0,0 @@
-#!/usr/bin/env python
-
-import os
-import sys
-import getopt
-
-import pyRepet.launcher.programLauncher
-from commons.core.seq.BioseqDB import BioseqDB
-from commons.tools.ChangeSequenceHeaders import ChangeSequenceHeaders
-
-
-def help():
-    print
-    print "usage: launchRefalign.py [ options ]"
-    print "options:"
-    print "     -h: this help"
-    print "     -i: name of the input file (refseq is first, format='fasta')"
-    print "     -r: keep the reference sequence"
-    print "     -o: name of the output file (default=inFileName+'.fa_aln')"
-    print "     -v: verbose (default=0)"
-    print
-
-
-def main():
-    """
-    Launch 'refalign' to build a master-slave multiple sequence alignment.
-    """
-    inFileName = ""
-    keepRefseq = False
-    outFileName = ""
-    verbose = 0
-    try:
-        opts,args=getopt.getopt(sys.argv[1:],"hi:ro:v:")
-    except getopt.GetoptError, err:
-            print str(err); help(); sys.exit(1)
-    for o,a in opts:
-        if o == "-h":
-            help()
-            sys.exit(0)
-        elif o == "-i":
-            inFileName = a
-        elif o == "-r":
-            keepRefseq = True
-        elif o == "-o":
-            outFileName = a
-        elif o == "-v":
-            verbose = int(a)
-    if inFileName == "":
-        print "ERROR: missing compulsory options"
-        help()
-        sys.exit(1)
-        
-    if verbose > 0:
-        print "START %s" % (sys.argv[0].split("/")[-1])
-        sys.stdout.flush()
-        
-    if verbose > 0:
-        print "build a multiple alignment from '%s'..." % ( inFileName )
-        sys.stdout.flush()
-        
-    if outFileName == "":
-        outFileName = "%s.fa_aln" % ( inFileName )
-        
-    csh = ChangeSequenceHeaders()
-    csh.setInputFile( inFileName )
-    csh.setFormat( "fasta" )
-    csh.setStep( 1 )
-    csh.setPrefix( "seq" )
-    csh.setLinkFile(  inFileName+".shortHlink" )
-    csh.setOutputFile( inFileName+".shortH" )
-    csh.setVerbosityLevel( verbose - 1 )
-    csh.run()
-    
-    bsDB = BioseqDB( inFileName+".shortH" )
-    bsDB.upCase()
-    bsDB.save( inFileName+".shortHtmp" )
-    del bsDB
-    os.rename( inFileName+".shortHtmp", inFileName+".shortH" )
-    
-    pL = pyRepet.launcher.programLauncher.programLauncher( inFileName+".shortH" )
-    if keepRefseq:
-        pL.launchRefalign( outFileName=inFileName+".shortH.fa_aln", refseqName="seq1", verbose=verbose )
-    else:
-        pL.launchRefalign( outFileName=inFileName+".shortH.fa_aln", verbose=verbose )
-        
-    csh.setInputFile( inFileName+".shortH.fa_aln" )
-    csh.setFormat( "fasta" )
-    csh.setStep( 2 )
-    csh.setLinkFile(  inFileName+".shortHlink" )
-    csh.setOutputFile(  outFileName )
-    csh.setVerbosityLevel( verbose - 1 )
-    csh.run()
-    
-    for f in [ inFileName+".shortH", inFileName+".shortHlink", inFileName+".shortH.fa_aln" ]:
-            os.remove( f )
-            
-    if verbose > 0:
-        print "END %s" % (sys.argv[0].split("/")[-1])
-        sys.stdout.flush()
-        
-    return 0
-
-
-if __name__ == "__main__":
-    main()
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/LaunchRepeatMasker.py
--- a/commons/launcher/LaunchRepeatMasker.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,113 +0,0 @@
-#! /usr/bin/env python
-
-# Copyright INRA (Institut National de la Recherche Agronomique)
-# http://www.inra.fr
-# http://urgi.versailles.inra.fr
-#
-# This software is governed by the CeCILL license under French law and
-# abiding by the rules of distribution of free software.  You can  use, 
-# modify and/ or redistribute the software under the terms of the CeCILL
-# license as circulated by CEA, CNRS and INRIA at the following URL
-# "http://www.cecill.info". 
-#
-# As a counterpart to the access to the source code and  rights to copy,
-# modify and redistribute granted by the license, users are provided only
-# with a limited warranty  and the software's author,  the holder of the
-# economic rights,  and the successive licensors  have only  limited
-# liability. 
-#
-# In this respect, the user's attention is drawn to the risks associated
-# with loading,  using,  modifying and/or developing or reproducing the
-# software by the user in light of its specific status of free software,
-# that may mean  that it is complicated to manipulate,  and  that  also
-# therefore means  that it is reserved for developers  and  experienced
-# professionals having in-depth computer knowledge. Users are therefore
-# encouraged to load and test the software's suitability as regards their
-# requirements in conditions enabling the security of their systems and/or 
-# data to be ensured and,  more generally, to use and operate it in the 
-# same conditions as regards security. 
-#
-# The fact that you are presently reading this means that you have had
-# knowledge of the CeCILL license and that you accept its terms.
-
-from commons.core.checker.CheckerUtils import CheckerUtils
-from commons.core.utils.FileUtils import FileUtils
-from commons.core.utils.RepetOptionParser import RepetOptionParser
-import subprocess
-  
-class LaunchRepeatMasker(object):
-
-    def __init__(self,queryFileName="", libFileName ="",sensitivity="", engine="wu", cutOff=225, outputDir = ".",verbosity=0):
-        self._queryFileName = queryFileName
-        self._libFileName = libFileName
-        self._engine = engine
-        self._sensitivity = sensitivity
-        self._cutOff = cutOff
-        self._outputDir = outputDir
-        self._verbosity = verbosity
-         
-    def setAttributesFromCmdLine(self):
-        description = "LaunchRepeatMasker runs the RepeatMasker program  ."    
-        parser = RepetOptionParser(description = description)
-        parser.add_option("-q", "--query", dest="queryFileName", default = None,  action="store", type="string", help="input query file [compulsory] [format: fasta]")
-        parser.add_option("-l", "--libFileName", dest="libFileName", default = None,  action="store", type="string", help="custom library [optional]")  
-        parser.add_option("-n", "--outputDir", dest="outputDir", default=".", action="store", type="string", help="outputDir (default : current directory) [optional] ")  
-        parser.add_option("-c", "--cutOff", dest="cutOff", default=225, action="store", type="int", help="Sets cutoff score for masking repeats when using -lib (default 225) [optional] ")
-        parser.add_option("-e", "--engine", dest="engine", default = "wu",  action="store", type="string", help="engine  [optional] ")    
-        parser.add_option("-u", "--sensitivity", dest="sensitivity", default = "",  action="store", type="string", help="sensitivity  can be s, q, qq[optional] ")    
-        parser.add_option("-v", "--verbosity", dest="verbosity", default = 0,  action="store", type="int", help="verbosity [optional] ")    
-
-        (options, args) = parser.parse_args()
-        self._setAttributesFromOptions(options)
-
-    def _setAttributesFromOptions(self, options):
-        self._queryFileName = options.queryFileName
-        self._libFileName = options.libFileName
-        self._outputDir = options.outputDir
-        self._engine = options.engine
-        self._sensitivity = options.sensitivity
-        self._cutOff = options.cutOff
-        self._verbosity = options.verbosity
-        
-    def checkOptions(self):       
-        if self._queryFileName != "":
-            if not FileUtils.isRessourceExists(self._queryFileName):
-                raise Exception("ERROR: Query file: %s does not exist!" % self._queryFileName)
-        else:
-            raise Exception("ERROR: No specified --query option!")
-                                
-    def run(self):
-        if not CheckerUtils.isExecutableInUserPath("RepeatMasker") :
-            print "ERROR: RepeatMasker must be in your path"
-        else:
-            self.checkOptions()
-            
-            engine = ""
-            if self._engine == "wu":
-                engine = "-e wublast"
-            elif self._engine == "cm":
-                engine = "-e crossmatch"
-            sensitivity = ""
-            if self._sensitivity:
-                sensitivity = "-%s" % self._sensitivity     
-            libFileName = ""
-            if self._libFileName != "":
-                libFileName = "-lib %s" % self._libFileName
-
-            cmd = "RepeatMasker %s -dir %s -pa 1 -gccalc -no_is -nolow %s %s %s" % (self._queryFileName,self._outputDir,engine,sensitivity,libFileName)
-            cmd = cmd.split() 
-            
-            if self._verbosity>0:
-                print("Running RepeatMasker with following commands : %s" %cmd)
-            
-            process = subprocess.Popen(cmd, stdout=subprocess.PIPE,stderr = subprocess.PIPE)
-#            process.wait()
-            output= process.communicate()
-            if self._verbosity>0:
-                print("".join(output))
-            return process.returncode
-            
-if __name__ == "__main__":
-    iLaunchRepeatMasker = LaunchRepeatMasker()
-    iLaunchRepeatMasker.setAttributesFromCmdLine()
-    iLaunchRepeatMasker.run()
\ No newline at end of file
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/LaunchTRF.py
--- a/commons/launcher/LaunchTRF.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,155 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright INRA (Institut National de la Recherche Agronomique)
-# http://www.inra.fr
-# http://urgi.versailles.inra.fr
-#
-# This software is governed by the CeCILL license under French law and
-# abiding by the rules of distribution of free software.  You can  use, 
-# modify and/ or redistribute the software under the terms of the CeCILL
-# license as circulated by CEA, CNRS and INRIA at the following URL
-# "http://www.cecill.info". 
-#
-# As a counterpart to the access to the source code and  rights to copy,
-# modify and redistribute granted by the license, users are provided only
-# with a limited warranty  and the software's author,  the holder of the
-# economic rights,  and the successive licensors  have only  limited
-# liability. 
-#
-# In this respect, the user's attention is drawn to the risks associated
-# with loading,  using,  modifying and/or developing or reproducing the
-# software by the user in light of its specific status of free software,
-# that may mean  that it is complicated to manipulate,  and  that  also
-# therefore means  that it is reserved for developers  and  experienced
-# professionals having in-depth computer knowledge. Users are therefore
-# encouraged to load and test the software's suitability as regards their
-# requirements in conditions enabling the security of their systems and/or 
-# data to be ensured and,  more generally, to use and operate it in the 
-# same conditions as regards security. 
-#
-# The fact that you are presently reading this means that you have had
-# knowledge of the CeCILL license and that you accept its terms.
-
-from commons.core.LoggerFactory import LoggerFactory
-from commons.core.utils.RepetOptionParser import RepetOptionParser
-from commons.core.checker.ConfigChecker import ConfigRules
-from commons.core.checker.ConfigChecker import ConfigChecker
-import subprocess
-import glob
-import os
-
-LOG_DEPTH = "repet.launchers"
-
-class LaunchTRF(object):
-    
-    def __init__(self, inFileName = "", outFileName = "", maxPeriod=15, doClean = False, verbosity = 0):
-        self.inFileName = inFileName
-        self.setOutFileName(outFileName)
-        self.maxPeriod=maxPeriod
-        self._doClean = doClean
-        self._verbosity = verbosity
-        self._log = LoggerFactory.createLogger("%s.%s" % (LOG_DEPTH, self.__class__.__name__), self._verbosity)
-        
-    def setAttributesFromCmdLine(self):
-        description = "Launch TRF to detect micro-satellites in sequences."
-        epilog = "\nExample 1: launch without verbosity and keep temporary files.\n"
-        epilog += "\t$ python LaunchTemplate.py -i file.fa -v 0"
-        epilog += "\n\t"
-        parser = RepetOptionParser(description = description, epilog = epilog)
-        parser.add_option("-i", "--in",      dest = "inFileName", action = "store",       type = "string", help = "input file name [compulsory] [format: fasta]", default = "")
-        parser.add_option("-o", "--out",        dest = "outFileName",   action = "store",       type = "string", help = "output file name [default: <input>.TRF.set]", default = "")
-        parser.add_option("-m", "--maxPeriod",  dest = "maxPeriod",     action = "store",       type = "int",    help = " maximum period size to report  [default: 15]", default = 15)
-        parser.add_option("-c", "--clean",      dest = "doClean",       action = "store_true",                   help = "clean temporary files [optional] [default: False]", default = False)
-        parser.add_option("-v", "--verbosity",  dest = "verbosity",     action = "store",       type = "int",    help = "verbosity [optional] [default: 1]", default = 1)
-        options = parser.parse_args()[0]
-        self._setAttributesFromOptions(options)
-        
-    def _setAttributesFromOptions(self, options):
-        self.setInFileName(options.inFileName)
-        self.setOutFileName(options.outFileName)
-        self.maxPeriod = options.maxPeriod
-        self.setDoClean(options.doClean)
-        self.setVerbosity(options.verbosity)
-                
-    def setInFileName(self, inFileName):
-        self.inFileName = inFileName
-        
-    def setOutFileName(self, outFileName):
-        if outFileName == "":
-            self._outFileName = "%s.TRF.set" % self.inFileName
-        else:
-            self._outFileName = outFileName
-        
-    def setDoClean(self, doClean):
-        self._doClean = doClean
-        
-    def setVerbosity(self, verbosity):
-        self._verbosity = verbosity
-        
-    def _checkOptions(self):
-        if self.inFileName == "":
-            self._logAndRaise("ERROR: Missing input file name")
-            
-    def _logAndRaise(self, errorMsg):
-        self._log.error(errorMsg)
-        raise Exception(errorMsg)
-    
-    
-    def _launchTRF(self):
-        cmd = "trf %s 2 3 5 80 10 20 %d -h -d" % (self.inFileName, self.maxPeriod)
-        self._log.debug("Running : %s" % cmd)
-        process = subprocess.Popen(cmd.split(' '), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
-        output = process.communicate()
-        self._log.debug("Output:\n%s" % output[0])
-        
-    def _parseTRF(self):
-        self._log.debug("Parsing TRF output")
-        with open( "%s.2.3.5.80.10.20.%d.dat" % (self.inFileName, self.maxPeriod),'r') as inFile:
-            with open(self._outFileName,'w') as outFile:
-                nbPatterns = 0
-                nbInSeq = 0
-                for line in inFile.readlines():
-                    if line == "":
-                        break
-                    data = line.split(" ")
-                    if len(data) > 1 and "Sequence:" in data[0]:
-                        nbInSeq += 1
-                        seqName = data[1][:-1]
-                    if len(data) < 14:
-                        continue
-                    nbPatterns += 1
-                    consensus = data[13]
-                    copyNb = int( float(data[3]) + 0.5 )
-                    start = data[0]
-                    end = data[1]
-                    outFile.write( "%i\t(%s)%i\t%s\t%s\t%s\n" % ( nbPatterns, consensus, copyNb, seqName, start, end ) )
-        self._log.debug("Finished Parsing TRF output")
-    
-    def _clean(self):
-        try:
-            os.remove("%s.2.3.5.80.10.20.%d.dat" % (self.inFileName, self.maxPeriod))
-        except:pass
-        
-
-    def run(self):
-        """
-        Launch TRF to detect micro-satellites in sequences.
-        """
-        LoggerFactory.setLevel(self._log, self._verbosity)
-        self._checkOptions()
-        self._log.info("START Launch")
-        self._log.debug("Input file name: %s" % self.inFileName)
-        
-        self._launchTRF()
-        self._parseTRF()
-        
-        if self._doClean:
-            self._log.warning("Files will be cleaned")
-            self._clean()
-        self._log.info("END Launch")
-  
-if __name__ == "__main__":
-    iLaunchTRF = LaunchTRF()
-    iLaunchTRF.setAttributesFromCmdLine()
-    iLaunchTRF.run()        
-
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/LaunchTallymer.py
--- a/commons/launcher/LaunchTallymer.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
b'@@ -1,328 +0,0 @@\n-#!/usr/bin/env python\n-\n-"""\n-Launch Tallymer\'s sub programs, generate map file, and convert output to gff and wig, as well as visual (RPlot) data\n-"""\n-\n-# Copyright INRA (Institut National de la Recherche Agronomique)\n-# http://www.inra.fr\n-# http://urgi.versailles.inra.fr\n-#\n-# This software is governed by the CeCILL license under French law and\n-# abiding by the rules of distribution of free software.  You can  use, \n-# modify and/ or redistribute the software under the terms of the CeCILL\n-# license as circulated by CEA, CNRS and INRIA at the following URL\n-# "http://www.cecill.info". \n-#\n-# As a counterpart to the access to the source code and  rights to copy,\n-# modify and redistribute granted by the license, users are provided only\n-# with a limited warranty  and the software\'s author,  the holder of the\n-# economic rights,  and the successive licensors  have only  limited\n-# liability. \n-#\n-# In this respect, the user\'s attention is drawn to the risks associated\n-# with loading,  using,  modifying and/or developing or reproducing the\n-# software by the user in light of its specific status of free software,\n-# that may mean  that it is complicated to manipulate,  and  that  also\n-# therefore means  that it is reserved for developers  and  experienced\n-# professionals having in-depth computer knowledge. Users are therefore\n-# encouraged to load and test the software\'s suitability as regards their\n-# requirements in conditions enabling the security of their systems and/or \n-# data to be ensured and,  more generally, to use and operate it in the \n-# same conditions as regards security. \n-#\n-# The fact that you are presently reading this means that you have had\n-# knowledge of the CeCILL license and that you accept its terms.\n-\n-import os\n-import shutil\n-import subprocess\n-import time\n-from commons.core.utils.RepetOptionParser import RepetOptionParser\n-from commons.core.LoggerFactory import LoggerFactory\n-from SMART.Java.Python.convertTranscriptFile import ConvertTranscriptFile\n-from commons.core.seq.BioseqUtils import BioseqUtils\n-from commons.core.seq.BioseqDB import BioseqDB\n-from Tallymer_pipe.PlotBenchMarkGFFFiles import PlotBenchMarkGFFFiles\n-\n-LOG_DEPTH = "repet.tools"\n-\n-\n-class LaunchTallymer(object):\n-    """\n-    Launch Tallymer\'s sub programs, generate map file, and convert output to\n-    gff and wig, as well as visual (RPlot) data\n-    """\n-    \n-    _lValidFormats = ["gff", "gff3", "wig", "bed", "map"]\n-    \n-    def __init__(self, inputFasta="", indexationFasta=None, merSize=20, minOccs=4, outputFormats="gff", nLargestScaffoldsToPlot=0, clean=False, verbosity=0):\n-        self.inputFasta = inputFasta\n-        self.indexationFasta = indexationFasta if indexationFasta != None else inputFasta \n-        self.merSize = merSize\n-        self.minOccs = minOccs\n-        self.outputFormats = outputFormats\n-        self.nLargestScaffoldsToPlot = nLargestScaffoldsToPlot\n-        self.doClean = clean\n-        self.verbosity = verbosity\n-        \n-        self._log = LoggerFactory.createLogger("%s.%s" % (LOG_DEPTH, self.__class__.__name__), self.verbosity)\n-        self._workdir = os.path.join(os.getcwd(), "launchTallymer_%s" % time.strftime("%Y%m%d%H%M%S"))\n-        self._tmpSearchFileName = None\n-        self._tmpMapFileName = None\n-        self._tmpStatFileName = None   \n-        self._tmpPngFileName = None\n-        self._plot_data = {}\n-        self._plot_data2 = {}\n-        \n-    def setAttributesFromCmdLine(self):\n-        description = "Generates stats from the results of the tallymer search ."    \n-        parser = RepetOptionParser(description=description)\n-        parser.add_option("-i", "--inputFasta", dest="inputFasta", default = "",  action="store", type="string", help="input fasta file [compulsory] [format: fasta]")\n-        parser.add_option("-u", "--indexationFasta", dest="indexationFasta", default = "",  action="store", type="string", help="input indexation fasta file used to generate'..b':\n-                statFile.write("%s\\t%i\\t%.10f\\n" % (kmer, dKmer2Occ[kmer], dKmer2Occ[kmer] / float(totalNbOcc)))\n-\n-    def _writeOutputFiles(self):\n-        for format in self.outputFormats:\n-            self._log.info("Generating %s file" % format)\n-            outputFileName = "%s.tallymer.%s" % (os.path.splitext(self.inputFasta)[0], format)\n-            try:\n-                iConvertTranscriptFile = ConvertTranscriptFile(inputFileName=self._tmpMapFileName, name="Tallymer",\\\n-                         inputFormat="map", outputFileName=outputFileName, outputFormat=format,feature= "Match", featurePart="Match-part", verbosity=0) #self.verbosity\n-                iConvertTranscriptFile.run()\n-            except Exception as inst:\n-                self._log.error("Error: %s - Failed to generate %s format ouput, skipping" % (inst, format))\n-            shutil.copy2(outputFileName, "../.")\n-\n-\n-class ConvertUtils(object):\n-    \n-    def convertTallymerFormatIntoMapFormatAndGenerateData(fastaFileName, searchFileName, mapFileName):\n-        dIndex2NameLengthList = ConvertUtils._createDictOfNameLengthAccordingToSeqOrder(fastaFileName)\n-        plotData = {}\n-        plotData2 = {}\n-        with open(searchFileName, "r") as talFile:\n-            with open(mapFileName, "w") as mapFile:\n-                totalNbOcc = 0\n-                dKmer2Occ = {}\n-                line = talFile.readline()\n-                while line:\n-                    data = line[:-1].split("\\t")\n-                    name = "%s_%s" % (data[3], data[2])\n-                    nbOccs = int(data[2])\n-                    chrname = dIndex2NameLengthList[int(data[0])][0]\n-                    if data[1][0] == "+":\n-                        start = int(data[1][1:]) + 1\n-                        end = start + len(data[3])\n-                    elif data[1][0] == "-":\n-                        start_revcomp = int(data[1][1:])\n-                        start = dIndex2NameLengthList[int(data[0])][1] - start_revcomp - 1\n-                        end = end - len(data[3]) + 1\n-                    mapLine = "%s\\t%s\\t%s\\t%s\\t%i\\n" % (name, chrname, start, end, nbOccs)\n-                    mapFile.write(mapLine)\n-                    \n-                    if plotData2.get(chrname,None) is None:\n-                        plotData2[chrname] = {}\n-                    if plotData2[chrname].get(start, None) is None:\n-                        plotData2[chrname][start]=0\n-                    plotData2[chrname][start] += nbOccs\n-                    \n-                    totalNbOcc += 1\n-                    if dKmer2Occ.has_key(data[3]):\n-                        dKmer2Occ[data[3]] += 1\n-                    else:\n-                        dKmer2Occ[data[3]] = 1\n-                    plotData[start] = nbOccs\n-                    line = talFile.readline()\n-        return totalNbOcc, dKmer2Occ, plotData, plotData2\n-    \n-    convertTallymerFormatIntoMapFormatAndGenerateData = staticmethod(convertTallymerFormatIntoMapFormatAndGenerateData)\n-    \n-    def _createDictOfNameLengthAccordingToSeqOrder(fastaFileName):\n-        with open(fastaFileName) as fastaFile:\n-            line = fastaFile.readline()\n-            i = 0\n-            length = 0\n-            dIndex2Name = {}\n-            while line:\n-                if line[0] == ">":\n-                    dIndex2Name[i] = [line[1:-1]]\n-                    if i > 0:\n-                        dIndex2Name[i - 1].append(length)\n-                        length = 0\n-                    i += 1\n-                else:\n-                    length += len(line[:-1])\n-                line = fastaFile.readline()\n-            dIndex2Name[i - 1].append(length)\n-        return dIndex2Name\n-    \n-    _createDictOfNameLengthAccordingToSeqOrder = staticmethod(_createDictOfNameLengthAccordingToSeqOrder)\n-\n-if __name__ == "__main__":\n-    iLaunchTallymer = LaunchTallymer()\n-    iLaunchTallymer.setAttributesFromCmdLine()\n-    iLaunchTallymer.run()        \n\\ No newline at end of file\n'
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/MafftClusterLauncher.py
--- a/commons/launcher/MafftClusterLauncher.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,59 +0,0 @@
-#!/usr/bin/env python
-
-##@file
-# Launch MafftProgramLauncher on several files in parallel on a cluster.
-
-
-from pyRepet.launcher.AbstractClusterLauncher import *
-from commons.launcher.MafftProgramLauncher import MafftProgramLauncher
-
-
-class MafftClusterLauncher( AbstractClusterLauncher ):
-    """
-    Launch Mafft on several files in parallel on a cluster.
-    """
-    
-    def __init__( self ):
-        """
-        Constructor.
-        """
-        AbstractClusterLauncher.__init__( self )
-        AbstractClusterLauncher.setAcronym( self, "Mafft" )
-        
-        self._cmdLineSpecificOptions = "p:"
-        
-        self._exeWrapper = "MafftProgramLauncher.py"
-        self._prgLauncher = None
-        self._prgLauncher = self.getProgramLauncherInstance()
-        
-        
-    def getSpecificHelpAsString( self ):
-        """
-        Return the specific help as a string.
-        """
-        string = ""
-        string += "\nspecific options:"
-        string += "\n     -p: parameters for 'mafft' (default='--auto')"
-        return string
-    
-    
-    def getProgramParameters( self ):
-        return self._prgLauncher.getProgramParameters()
-    
-    
-    def getProgramLauncherInstance( self ):
-        if self._prgLauncher == None:
-            self._prgLauncher = MafftProgramLauncher()
-            self._prgLauncher.setInputFile( GENERIC_IN_FILE )
-            self._prgLauncher.setOutputFile( "%s.fa_aln" % ( GENERIC_IN_FILE ) )
-            self._prgLauncher.setClean()
-            self._prgLauncher.setVerbosityLevel( 1 )
-            self._prgLauncher.setListFilesToKeep()
-            self._prgLauncher.setListFilesToRemove()
-        return self._prgLauncher
-    
-    
-if __name__ == "__main__":
-    i = MafftClusterLauncher()
-    i.setAttributesFromCmdLine()
-    i.run()
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/MafftProgramLauncher.py
--- a/commons/launcher/MafftProgramLauncher.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,188 +0,0 @@
-#!/usr/bin/env python
-
-##@file
-# Launch Mafft (multiple alignment).
-#
-# options:
-#      -h: this help
-#      -i: name of the input file (format='fasta')
-#      -p: parameters for 'mafft' (default='--auto')
-#      -o: name of the output file (format='aligned fasta', default=inFile+'.fa_aln')
-#      -c: clean
-#      -v: verbosity level (default=0/1)
-
-
-import os
-import sys
-import getopt
-import exceptions
-
-from pyRepet.launcher.AbstractProgramLauncher import AbstractProgramLauncher
-from pyRepet.seq.fastaDB import *
-from commons.core.seq.FastaUtils import FastaUtils
-from commons.core.seq.AlignedBioseqDB import AlignedBioseqDB
-from commons.tools.ChangeSequenceHeaders import ChangeSequenceHeaders
-
-
-class MafftProgramLauncher( AbstractProgramLauncher ):
-    """
-    Launch Mafft (multiple alignment).
-    """
-    
-    
-    def __init__( self ):
-        """
-        Constructor.
-        """
-        AbstractProgramLauncher.__init__( self )
-        self._prgName = "mafft"
-        self._formatInFile = "fasta"
-        self._prgParam = "--auto"
-        self._cmdLineSpecificOptions = "p:o:"
-        
-        
-    def getSpecificHelpAsString( self ):
-        """
-        Return the specific help as a string.
-        """
-        string = ""
-        string += "\nspecific options:"
-        string += "\n     -p: parameters for '%s' (default='--auto')" % ( self.getProgramName() )
-        string += "\n     -o: name of the output file (format='aligned fasta', default=inFile+'.fa_aln')"
-        return string
-    
-    
-    def setASpecificAttributeFromCmdLine( self, o, a="" ):
-        """
-        Set a specific attribute from the command-line arguments.
-        """
-        if o == "-p":
-            self.setProgramParameters( a )
-        elif o == "-o":
-            self.setOutputFile( a )
-            
-            
-    def checkSpecificAttributes( self ):
-        """
-        Check the specific attributes before running the program.
-        """
-        if self.getOutputFile() == "":
-            self.setOutputFile( "%s.fa_aln" % ( self.getInputFile() ) )
-            
-            
-    def setWrapperCommandLine( self ):
-        """
-        Set the command-line of the wrapper.
-        Required for MafftClusterLauncher.
-        """
-        self._wrpCmdLine = self.getWrapperName()
-        self._wrpCmdLine += " -i %s" % ( self.getInputFile() )
-        self._wrpCmdLine += " -p '%s'" % ( self.getProgramParameters() )
-        if self.getOutputFile() == "":
-            self.setOutputFile( "%s.fa_aln" % ( self.getInputFile() ) )
-        self._wrpCmdLine += " -o %s" % ( self.getOutputFile() )
-        if self.getClean():
-            self._wrpCmdLine += " -c"
-        self._wrpCmdLine += " -v %i" % ( self.getVerbosityLevel() )
-        
-        
-    def setProgramCommandLine( self ):
-        """
-        Set the command-line of the program.
-        """
-        self._prgCmdLine = self.getProgramName()
-        self._prgCmdLine += " %s" % ( self.getProgramParameters() )
-        if self.getVerbosityLevel() == 0 and "--quiet" not in self._prgCmdLine:
-            self._prgCmdLine += " --quiet"
-        self._prgCmdLine += " %s.shortH" % ( self.getInputFile() )
-        self._prgCmdLine += " > %s.shortH.fa_aln" % ( self.getInputFile() )
-        if self._verbose < 2:
-            self._prgCmdLine += " 2> /dev/null"
-            
-            
-    def setListFilesToKeep( self ):
-        """
-        Set the list of files to keep.
-        """
-        if self.getOutputFile() == "":
-            self.setOutputFile( "%s.fa_aln" % ( self.getInputFile() ) )
-        self.appendFileToKeep( self.getOutputFile() )
-        
-        
-    def setListFilesToRemove( self ):
-        """
-        Set the list of files to remove.
-        """
-        self.appendFileToRemove( "%s.shortH" % ( self.getInputFile() ) )
-        self.appendFileToRemove( "%s.shortH.fa_aln" % ( self.getInputFile() ) )
-        self.appendFileToRemove( "%s.shortHlink" % ( self.getInputFile() ) )
-        
-        
-    def setSummary( self ):
-        self._summary = "input file: %s" % ( self.getInputFile() )
-        self._summary += "\nparameters: %s" % ( self.getProgramParameters() )
-        if self.getOutputFile() == "":
-            self.setOutputFile( "%s.fa_aln" % ( self.getInputFile() ) )
-        self._summary += "\noutput file: %s" % ( self.getOutputFile() )
-        
-        
-    def run( self ):
-        """
-        Run the program.
-        """
-        self.start()
-        
-        lInitHeaders = FastaUtils.dbHeaders( self.getInputFile(), self.getVerbosityLevel()-1 )
-        
-        csh = ChangeSequenceHeaders()
-        csh.setInputFile( self.getInputFile() )
-        csh.setFormat( "fasta" )
-        csh.setStep( 1 )
-        csh.setPrefix( "seq" )
-        csh.setLinkFile( "%s.shortHlink" % ( self.getInputFile() ) )
-        csh.setOutputFile( "%s.shortH" % ( self.getInputFile() ) )
-        csh.setVerbosityLevel( self.getVerbosityLevel() - 1 )
-        csh.run()
-        
-        bsDB = BioseqDB( "%s.shortH" % ( self.getInputFile() ) )
-        bsDB.upCase()
-        bsDB.save( "%s.shortHtmp" % ( self.getInputFile() ) )
-        del bsDB
-        os.rename( "%s.shortHtmp" % ( self.getInputFile() ),
-                   "%s.shortH" % ( self.getInputFile() ) )
-        
-        self.setProgramCommandLine()
-        cmd = self.getProgramCommandLine()
-        if self.getVerbosityLevel() > 0:
-            print "LAUNCH: %s" % ( cmd )
-            sys.stdout.flush()
-        exitStatus = os.system( cmd )
-        if exitStatus != 0:
-            string = "ERROR: program '%s' returned exit status '%i'" % ( self.getProgramName(), exitStatus )
-            print string
-            sys.exit(1)
-            
-        csh.setInputFile( "%s.shortH.fa_aln" % ( self.getInputFile() ) )
-        csh.setFormat( "fasta" )
-        csh.setStep( 2 )
-        csh.setLinkFile( "%s.shortHlink" % ( self.getInputFile() ) )
-        csh.setOutputFile( "%s.shortH.fa_aln.initH" % ( self.getInputFile() ) )
-        csh.setVerbosityLevel( self.getVerbosityLevel() - 1 )
-        csh.run()
-        
-        absDB = AlignedBioseqDB( "%s.shortH.fa_aln.initH" % ( self.getInputFile() ) )
-        outFileHandler = open( self.getOutputFile(), "w" )
-        for header in lInitHeaders:
-            bs = absDB.fetch( header )
-            bs.upCase()
-            bs.write( outFileHandler )
-        outFileHandler.close()
-        os.remove( "%s.shortH.fa_aln.initH" % ( self.getInputFile() ) )
-        
-        self.end()
-        
-        
-if __name__ == "__main__":
-    i = MafftProgramLauncher()
-    i.setAttributesFromCmdLine()
-    i.run()
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/MapClusterLauncher.py
--- a/commons/launcher/MapClusterLauncher.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,81 +0,0 @@
-#!/usr/bin/env python
-
-##@file
-# Launch MapProgramLauncher.py on several files in parallel on a cluster.
-
-
-import os
-import sys
-import getopt
-import exceptions
-
-from pyRepet.launcher.AbstractClusterLauncher import *
-from commons.launcher.MapProgramLauncher import MapProgramLauncher
-
-
-class MapClusterLauncher( AbstractClusterLauncher ):
-    """
-    Launch Map on several files in parallel on a cluster.
-    """
-    
-    
-    def __init__( self ):
-        """
-        Constructor.
-        """
-        AbstractClusterLauncher.__init__( self )
-        AbstractClusterLauncher.setAcronym( self, "Map" )
-        
-        self._cmdLineSpecificOptions = "s:m:O:e:"
-        
-        self._exeWrapper = "MapProgramLauncher.py"
-        self._prgLauncher = None
-        self._prgLauncher = self.getProgramLauncherInstance()
-        
-        
-    def getSpecificHelpAsString( self ):
-        """
-        Return the specific help as a string.
-        """
-        string = ""
-        string += "\nspecific options:"
-        string += "\n     -s: size above which a gap is not penalized anymore (default='%i')" % ( self.getGapSize() )
-        string += "\n     -m: penalty for a mismatch (default='%i')" % ( self.getMismatchPenalty() )
-        string += "\n     -O: penalty for a gap openning (default='%i')" % ( self.getGapOpenPenalty() )
-        string += "\n     -e: penalty for a gap extension (default='%i')" % ( self.getGapExtendPenalty() )
-        return string
-    
-    
-    def getGapSize( self ):
-        return self._prgLauncher.getGapSize()
-        
-        
-    def getMismatchPenalty( self ):
-        return self._prgLauncher.getMismatchPenalty()
-        
-        
-    def getGapOpenPenalty( self ):
-        return self._prgLauncher.getGapOpenPenalty()
-        
-        
-    def getGapExtendPenalty( self ):
-        return self._prgLauncher.getGapExtendPenalty()
-    
-    
-    def getProgramLauncherInstance( self ):
-        if self._prgLauncher == None:
-            self._prgLauncher = MapProgramLauncher()
-            self._prgLauncher.setInputFile( GENERIC_IN_FILE )
-            self._prgLauncher.setOutputFile( "%s.fa_aln" % ( GENERIC_IN_FILE ) )
-            #TESt de SATannot verifier si clean est a vrai
-            #self._prgLauncher.setClean()
-            self._prgLauncher.setVerbosityLevel( 1 )
-            self._prgLauncher.setListFilesToKeep()
-            self._prgLauncher.setListFilesToRemove()
-        return self._prgLauncher
-    
-    
-if __name__ == "__main__":
-    i = MapClusterLauncher()
-    i.setAttributesFromCmdLine()
-    i.run()
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/MapProgramLauncher.py
--- a/commons/launcher/MapProgramLauncher.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
b'@@ -1,251 +0,0 @@\n-#!/usr/bin/env python\n-\n-##@file\n-# Launch Map (multiple alignment).\n-#\n-# options:\n-#      -h: this help\n-#      -i: name of the input file (format=\'fasta\')\n-#      -s: size above which a gap is not penalized anymore (default=\'50\')\n-#      -m: penalty for a mismatch (default=\'-8\')\n-#      -O: penalty for a gap opening (default=\'16\')\n-#      -e: penalty for a gap extension (default=\'4\')\n-#      -o: name of the output file (format=\'aligned fasta\', default=inFile+\'.fa_aln\')\n-#      -c: clean\n-#      -v: verbosity level (default=0/1)\n-\n-\n-import sys\n-import os\n-\n-from pyRepet.launcher.AbstractProgramLauncher import AbstractProgramLauncher\n-from commons.core.seq.FastaUtils import FastaUtils\n-from commons.core.seq.AlignedBioseqDB import AlignedBioseqDB\n-from commons.tools.ChangeSequenceHeaders import ChangeSequenceHeaders\n-\n-\n-class MapProgramLauncher( AbstractProgramLauncher ):\n-    """\n-    Launch Map (multiple alignment).\n-    """\n-    \n-    \n-    def __init__( self ):\n-        """\n-        Constructor.\n-        """\n-        AbstractProgramLauncher.__init__( self )\n-        self._prgName = "rpt_map"\n-        self._formatInFile = "fasta"\n-        self._cmdLineSpecificOptions = "s:m:O:e:o:"\n-        self._gapSize = 50\n-        self._mismatchPenalty = -8\n-        self._gapOpenPenalty = 16\n-        self._gapExtendPenalty = 4\n-        self._outFile = ""\n-        \n-    def getSpecificHelpAsString( self ):\n-        """\n-        Return the specific help as a string.\n-        """\n-        string = ""\n-        string += "\\nspecific options:"\n-        string += "\\n     -s: size above which a gap is not penalized anymore (default=\'%i\')" % ( self.getGapSize() )\n-        string += "\\n     -m: penalty for a mismatch (default=\'%i\', match=10)" % ( self.getMismatchPenalty() )\n-        string += "\\n     -O: penalty for a gap opening (default=\'%i\')" % ( self.getGapOpenPenalty() )\n-        string += "\\n     -e: penalty for a gap extension (default=\'%i\')" % ( self.getGapExtendPenalty() )\n-        string += "\\n     -o: name of the output file (format=\'aligned fasta\', default=inFile+\'.fa_aln\')"\n-        return string\n-    \n-    \n-    def setASpecificAttributeFromCmdLine( self, o, a="" ):\n-        """\n-        Set a specific attribute from the command-line arguments.\n-        """\n-        if o == "-s":\n-            self.setGapSize( a )\n-        elif o == "-m":\n-            self.setMismatchPenalty( a )\n-        elif o == "-O":\n-            self.setGapOpenPenalty( a )\n-        elif o == "-e":\n-            self.setGapExtendPenalty( a )\n-        elif o == "-o":\n-            self.setOutputFile( a )\n-\n-                        \n-    def setGapSize( self, arg ):\n-        self._gapSize = int(arg)\n-        \n-        \n-    def setMismatchPenalty( self, arg ):\n-        self._mismatchPenalty = int(arg)\n-        \n-        \n-    def setGapOpenPenalty( self, arg ):\n-        self._gapOpenPenalty = int(arg)\n-        \n-        \n-    def setGapExtendPenalty( self, arg ):\n-        self._gapExtendPenalty = int(arg)\n-        \n-        \n-    def getGapSize( self ):\n-        return self._gapSize\n-        \n-        \n-    def getMismatchPenalty( self ):\n-        return self._mismatchPenalty\n-        \n-        \n-    def getGapOpenPenalty( self ):\n-        return self._gapOpenPenalty\n-        \n-        \n-    def getGapExtendPenalty( self ):\n-        return self._gapExtendPenalty\n-        \n-        \n-    def checkSpecificAttributes( self ):\n-        """\n-        Check the specific attributes before running the program.\n-        """\n-        if self.getGapSize() <= 0:\n-            string = "ERROR: gap size should be > 0"\n-            print string\n-            print self.getHelpAsString()\n-            sys.exit(1)\n-        if self.getMismatchPenalty() >= 0:\n-            string = "ERROR: mismatch penalty should be < 0"\n-            print string\n-            print self.getHelpAsString()\n-            sys.exit(1)\n-        if self.getGapOpenPenalty() < 0:\n-            st'..b'_wrpCmdLine += " -c"\n-        self._wrpCmdLine += " -v %i" % ( self.getVerbosityLevel() )\n-        \n-        \n-    def setProgramCommandLine( self ):\n-        """\n-        Set the command-line of the program.\n-        """\n-        self._prgCmdLine = self.getProgramName()\n-        self._prgCmdLine += " %s.shortH" % ( self.getInputFile() )\n-        self._prgCmdLine += " %i" % ( self.getGapSize() )\n-        self._prgCmdLine += " %i" % ( self.getMismatchPenalty() )\n-        self._prgCmdLine += " %i" % ( self.getGapOpenPenalty() )\n-        self._prgCmdLine += " %i" % ( self.getGapExtendPenalty() )\n-        self._prgCmdLine += " > %s.shortH.fa_aln" % ( self.getInputFile() )\n-        \n-        \n-    def setListFilesToKeep( self ):\n-        """\n-        Set the list of files to keep.\n-        """\n-        if self.getOutputFile() == "":\n-            self.setOutputFile( "%s.fa_aln" % ( self.getInputFile() ) )\n-        self.appendFileToKeep( self.getOutputFile() )\n-        \n-        \n-    def setListFilesToRemove( self ):\n-        """\n-        Set the list of files to remove.\n-        """\n-        self.appendFileToRemove( "%s.shortH" % ( self.getInputFile() ) )\n-        self.appendFileToRemove( "%s.shortH.fa_aln" % ( self.getInputFile() ) )\n-        self.appendFileToRemove( "%s.shortHlink" % ( self.getInputFile() ) )\n-        \n-        \n-    def setSummary( self ):\n-        self._summary = "input file: %s" % ( self.getInputFile() )\n-        self._summary += "\\ngap size: %i" % ( self.getGapSize() )\n-        self._summary += "\\nmismatch penalty: %i" % ( self.getMismatchPenalty() )\n-        self._summary += "\\ngap openning penalty: %i" % ( self.getGapOpenPenalty() )\n-        self._summary += "\\ngap extension penalty: %i" % ( self.getGapExtendPenalty() )\n-        if self.getOutputFile() == "":\n-            self.setOutputFile( "%s.fa_aln" % ( self.getInputFile() ) )\n-        self._summary += "\\noutput file: %s" % ( self.getOutputFile() )\n-        \n-        \n-    def run( self ):\n-        """\n-        Run the program.\n-        """\n-        self.start()\n-        \n-        lInitHeaders = FastaUtils.dbHeaders( self.getInputFile(), self.getVerbosityLevel()-1 )\n-        \n-        csh = ChangeSequenceHeaders()\n-        csh.setInputFile( self.getInputFile() )\n-        csh.setFormat( "fasta" )\n-        csh.setStep( 1 )\n-        csh.setPrefix( "seq" )\n-        csh.setLinkFile( "%s.shortHlink" % ( self.getInputFile() ) )\n-        csh.setOutputFile( "%s.shortH" % ( self.getInputFile() ) )\n-        csh.setVerbosityLevel( self.getVerbosityLevel() - 1 )\n-        csh.run()\n-        \n-        self.setProgramCommandLine()\n-        cmd = self.getProgramCommandLine()\n-        if self.getVerbosityLevel() > 0:\n-            print "LAUNCH: %s" % ( cmd )\n-            sys.stdout.flush()\n-        returnStatus = os.system( cmd )\n-        if returnStatus != 0:\n-            string = "ERROR: program \'%s\' returned status \'%i\'" % ( self.getProgramName(), returnStatus )\n-            print string\n-            sys.exit(1)\n-            \n-        csh.setInputFile( "%s.shortH.fa_aln" % ( self.getInputFile() ) )\n-        csh.setFormat( "fasta" )\n-        csh.setStep( 2 )\n-        csh.setLinkFile( "%s.shortHlink" % ( self.getInputFile() ) )\n-        csh.setOutputFile( "%s.shortH.fa_aln.initH" % ( self.getInputFile() ) )\n-        csh.setVerbosityLevel( self.getVerbosityLevel() - 1 )\n-        csh.run()\n-        \n-        absDB = AlignedBioseqDB( "%s.shortH.fa_aln.initH" % ( self.getInputFile() ) )\n-        outFileHandler = open( self.getOutputFile(), "w" )\n-        for header in lInitHeaders:\n-            bs = absDB.fetch( header )\n-            bs.upCase()\n-            bs.write( outFileHandler )\n-        outFileHandler.close()\n-        if self.getClean():\n-            os.remove( "%s.shortH.fa_aln.initH" % ( self.getInputFile() ) )\n-        \n-        self.end()\n-        \n-        \n-if __name__ == "__main__":\n-    i = MapProgramLauncher()\n-    i.setAttributesFromCmdLine()\n-    i.run()\n'
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/NWalignProgramLauncher.py
--- a/commons/launcher/NWalignProgramLauncher.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,187 +0,0 @@
-#!/usr/bin/env python
-
-##@file
-# Launch NWalign (pairwise alignment).
-#
-# options:
-#      -h: this help
-#      -i: name of the input file (queries, format='fasta')
-#      -s: name of the subject file (format='fasta')
-#      -p: parameters for 'NWalign' (default='-d 2')
-#      -o: name of the output file (format='align', default=inFile+'.align')
-#      -c: clean
-#      -v: verbosity level (default=0/1)
-
-
-import os
-import sys
-
-from pyRepet.launcher.AbstractProgramLauncher import AbstractProgramLauncher
-from commons.core.seq.AlignedBioseqDB import AlignedBioseqDB
-from commons.core.coord.AlignUtils import AlignUtils
-
-
-class NWalignProgramLauncher( AbstractProgramLauncher ):
-    """
-    Launch NWalign (pairwise alignment).
-    """
-    
-    def __init__( self ):
-        """
-        Constructor.
-        """
-        AbstractProgramLauncher.__init__( self )
-        self._prgName = "NWalign"
-        self._formatInFile = "fasta"
-        self._sbjFile = ""
-        self._prgParam = ""
-        self._cmdLineSpecificOptions = "s:p:o:"
-        
-        
-    def getSpecificHelpAsString( self ):
-        """
-        Return the specific help as a string.
-        """
-        string = ""
-        string += "\nspecific options:"
-        string += "\n     -s: name of the subject file (format='fasta')"
-        string += "\n     -p: parameters for '%s'" % ( self.getProgramName() )
-        string += "\n     -o: name of the output file (format='align', default=inFile+'.align')"
-        return string
-    
-    
-    def setASpecificAttributeFromCmdLine( self, o, a="" ):
-        """
-        Set a specific attribute from the command-line arguments.
-        """
-        if o =="-s":
-            self.setSubjectFile( a )
-        elif o == "-p":
-            self.setProgramParameters( a )
-        elif o == "-o":
-            self.setOutputFile( a )
-            
-            
-    def setSubjectFile( self, arg ):
-        self._sbjFile = arg
-        
-        
-    def getSubjectFile( self ):
-        return self._sbjFile
-    
-    
-    def checkSpecificAttributes( self ):
-        """
-        Check the specific attributes before running the program.
-        """
-        if self._sbjFile == "":
-            string = "ERROR: missing subject file (-s)"
-            print string
-            print self.getHelpAsString()
-            sys.exit(1)
-        if self.getOutputFile() == "":
-            self.setOutputFile( "%s.align" % ( self.getInputFile() ) )
-            
-            
-    def setWrapperCommandLine( self ):
-        """
-        Set the command-line of the wrapper.
-        Required for NWalignClusterLauncher.
-        """
-        self._wrpCmdLine = self.getWrapperName()
-        self._wrpCmdLine += " -i %s" % ( self.getInputFile() )
-        self._wrpCmdLine += " -s %s" % ( self.getSubjectFile() )
-        if self.getProgramParameters() != "":
-            self._wrpCmdLine += " -p '%s'" % ( self.getProgramParameters() )
-        if self.getOutputFile() == "":
-            self.setOutputFile( "%s.align" % ( self.getInputFile() ) )
-        self._wrpCmdLine += " -o %s" % ( self.getOutputFile() )
-        if self.getClean():
-            self._wrpCmdLine += " -c"
-        self._wrpCmdLine += " -v %i" % ( self.getVerbosityLevel() )
-        
-        
-    def setProgramCommandLine( self ):
-        """
-        Set the command-line of the program.
-        """
-        self._prgCmdLine = self.getProgramName()
-        if self.getProgramParameters() != "":
-            self._prgCmdLine += " %s" % ( self.getProgramParameters() )
-        self._prgCmdLine += " -o %s.afa" % ( self.getInputFile() )
-        self._prgCmdLine += " -v %i" % ( self.getVerbosityLevel() )
-        self._prgCmdLine += " %s" % ( self.getSubjectFile() )
-        self._prgCmdLine += " %s" % ( self.getInputFile() )
-        
-        
-    def setListFilesToKeep( self ):
-        """
-        Set the list of files to keep.
-        """
-        if self.getOutputFile() == "":
-            self.setOutputFile( "%s.afa" % ( self.getInputFile() ) )
-        self.appendFileToKeep( self.getOutputFile() )
-        
-        
-    def postprocess( self ):
-        absDB = AlignedBioseqDB( "%s.afa" % ( self.getInputFile() ) )
-        lHeaders = absDB.getHeaderList()
-        queryHeader = lHeaders[0]
-        subjectHeader = lHeaders[1]
-        queryLength = absDB.fetch( queryHeader ).getLength()
-        subjectLength = absDB.fetch( subjectHeader ).getLength()
-        lAligns = absDB.getAlignList( queryHeader, subjectHeader )
-        for i in lAligns:
-            if "re-oriented" in i.getQueryName():
-                i.setQueryName( queryHeader.replace(" re-oriented","") )
-                start = i.getQueryStart()
-                end = i.getQueryEnd()
-                i.setQueryStart( queryLength - end + 1 )
-                i.setQueryEnd( queryLength - start + 1 )
-            if "re-oriented" in i.getSubjectName():
-                i.setSubjectName( subjectHeader.replace(" re-oriented","") )
-                start = i.getSubjectStart()
-                end = i.getSubjectEnd()
-                i.setSubjectEnd( subjectLength - end + 1 )
-                i.setSubjectStart( subjectLength - start + 1 )
-            if not i.isQueryOnDirectStrand():
-                i.reverse()
-        AlignUtils.writeListInFile( lAligns, self.getOutputFile() )
-        os.remove( "%s.afa" % ( self.getInputFile() ) )
-        
-        
-    def setSummary( self ):
-        self._summary = "input file: %s" % ( self.getInputFile() )
-        self._summary += "\nsubject file: %s" % ( self.getSubjectFile() )
-        self._summary += "\nparameters: %s" % ( self.getProgramParameters() )
-        if self.getOutputFile() == "":
-            self.setOutputFile( "%s.align" % ( self.getInputFile() ) )
-        self._summary += "\noutput file: %s" % ( self.getOutputFile() )
-        
-        
-    def run( self ):
-        """
-        Run the program.
-        """
-        self.start()
-        
-        self.setProgramCommandLine()
-        cmd = self.getProgramCommandLine()
-        if self.getVerbosityLevel() > 0:
-            print "LAUNCH: %s" % ( cmd )
-            sys.stdout.flush()
-        exitStatus = os.system( cmd )
-        if exitStatus != 0:
-            string = "ERROR: program '%s' returned exit status '%i'" % ( self.getProgramName(), exitStatus )
-            print string
-            sys.exit(1)
-            
-        self.postprocess()
-        
-        self.end()
-        
-        
-if __name__ == "__main__":
-    i = NWalignProgramLauncher()
-    i.setAttributesFromCmdLine()
-    i.run()
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/RepeatMaskerClusterLauncher.py
--- a/commons/launcher/RepeatMaskerClusterLauncher.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,77 +0,0 @@
-#!/usr/bin/env python
-
-##@file
-# Launch RepeatMaskerProgramLauncher on several files in parallel on a cluster.
-
-
-import os
-import sys
-import getopt
-import exceptions
-
-from pyRepet.launcher.AbstractClusterLauncher import *
-from commons.launcher.RepeatMaskerProgramLauncher import RepeatMaskerProgramLauncher
-
-
-class RepeatMaskerClusterLauncher( AbstractClusterLauncher ):
-    """
-    Launch RepeatMasker on several files in parallel on a cluster.
-    """
-    
-    def __init__( self ):
-        """
-        Constructor.
-        """
-        AbstractClusterLauncher.__init__( self )
-        AbstractClusterLauncher.setAcronym( self, "RM" )
-        
-        self._cmdLineSpecificOptions = "s:n:gbl"
-        
-        self._exeWrapper = "RepeatMaskerProgramLauncher.py"
-        self._prgLauncher = RepeatMaskerProgramLauncher()
-        self._prgLauncher.setInputFile( GENERIC_IN_FILE )
-        self._prgLauncher.setOutputFile( GENERIC_IN_FILE )
-        self._prgLauncher.setClean()
-        self._prgLauncher.setVerbosityLevel( 1 )
-        self._prgLauncher.setListFilesToKeep()
-        self._prgLauncher.setListFilesToRemove()
-        
-        
-    def getSpecificHelpAsString( self ):
-        """
-        Return the specific help as a string.
-        """
-        string = ""
-        string += "\nspecific options:"
-        string += "\n     -s: name of the subject file (repeats, format='fasta')"
-        string += "\n     -n: nb of processors to use in parallel (default=1)"
-        string += "\n     -g: calculate the GC content"
-        string += "\n     -b: skip bacterial insertion element check"
-        string += "\n     -l: mask low-complexity DNA or simple repeats"
-        return string
-    
-    
-    def getSubjectFile( self ):
-        return self._prgLauncher.getSubjectFile()
-    
-    
-    def getNbProcessors( self ):
-        return self._prgLauncher.getNbProcessors()
-    
-    
-    def getCalculateGCcontent( self ):
-        return self._prgLauncher.getCalculateGCcontent()
-    
-    
-    def getSkipBacterialIsCheck( self ):
-        return self._prgLauncher.getSkipBacterialIsCheck()
-    
-    
-    def getMaskSsr( self ):
-        return self._prgLauncher.getMaskSsr()
-    
-    
-if __name__ == "__main__":
-    i = RepeatMaskerClusterLauncher()
-    i.setAttributesFromCmdLine()
-    i.run()
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/RepeatMaskerProgramLauncher.py
--- a/commons/launcher/RepeatMaskerProgramLauncher.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
b'@@ -1,286 +0,0 @@\n-#!/usr/bin/env python\n-\n-##@file\n-# Launch RepeatMasker (pairwise alignment for repeat detection).\n-\n-\n-import os\n-import sys\n-\n-from pyRepet.launcher.AbstractProgramLauncher import AbstractProgramLauncher\n-\n-\n-class RepeatMaskerProgramLauncher( AbstractProgramLauncher ):\n-    """\n-    Launch RepeatMasker (pairwise alignment for repeat detection).\n-    """\n-    \n-    def __init__( self ):\n-        """\n-        Constructor.\n-        """\n-        AbstractProgramLauncher.__init__( self )\n-        self._prgName = "RepeatMasker"\n-        self._formatInFile = "fasta"\n-        self._sbjFile = ""\n-        self._nbProc = 1\n-        self._calcGc = False\n-        self._skipIs = False\n-        self._maskSsr = True\n-        self._onlySsr = False\n-        self._cmdLineSpecificOptions = "s:n:gblmo:"\n-        \n-        \n-    def getSpecificHelpAsString( self ):\n-        """\n-        Return the specific help as a string.\n-        """\n-        string = ""\n-        string += "\\nspecific options:"\n-        string += "\\n     -s: name of the subject file (repeats, format=\'fasta\')"\n-        string += "\\n     -n: nb of processors to use in parallel (default=\'%i\')" % ( self.getNbProcessors() )\n-        string += "\\n     -g: calculate the GC content"\n-        string += "\\n     -b: skip bacterial insertion element check"\n-        string += "\\n     -l: does not mask low-complexity DNA or simple repeats"\n-        string += "\\n     -m: only masks low complex/simple repeats (no interspersed repeats)"\n-        string += "\\n     -o: name of the output file"\n-        string += "\\n         with -s: format=\'align\', default=inFile+\'.cat.align\')"\n-        string += "\\n         with -m: format=\'path\', default=inFile+\'.cat.path\')"\n-        return string\n-    \n-    \n-    def setASpecificAttributeFromCmdLine( self, o, a="" ):\n-        """\n-        Set a specific attribute from the command-line arguments.\n-        """\n-        if o =="-s":\n-            self.setSubjectFile( a )\n-        elif o == "-n":\n-            self.setNbProcessors( a )\n-        elif o == "-g":\n-            self.setCalculateGCcontent()\n-        elif o == "-b":\n-            self.setSkipBacterialIsCheck()\n-        elif o == "-l":\n-            self.unsetMaskSsr()\n-        elif o == "-m":\n-            self.setOnlySsr()\n-        elif o == "-o":\n-            self.setOutputFile( a )\n-            \n-            \n-    def setSubjectFile( self, arg ):\n-        self._sbjFile = arg\n-        \n-        \n-    def setNbProcessors( self, arg ):\n-        self._nbProc = int(arg)\n-        \n-        \n-    def setCalculateGCcontent( self ):\n-        self._calcGc = True\n-        \n-        \n-    def setSkipBacterialIsCheck( self ):\n-        self._skipIs = True\n-        \n-        \n-    def unsetMaskSsr( self ):\n-        self._maskSsr = False\n-        \n-        \n-    def setOnlySsr( self ):\n-        self._onlySsr = True\n-        \n-        \n-    def getSubjectFile( self ):\n-        return self._sbjFile\n-    \n-    \n-    def getNbProcessors( self ):\n-        return self._nbProc\n-    \n-    \n-    def getCalculateGCcontent( self ):\n-        return self._calcGc\n-    \n-    \n-    def getSkipBacterialIsCheck( self ):\n-        return self._skipIs\n-    \n-    \n-    def getMaskSsr( self ):\n-        return self._maskSsr\n-    \n-    \n-    def getOnlySsr( self ):\n-        return self._onlySsr\n-    \n-    \n-    def checkSpecificAttributes( self ):\n-        """\n-        Check the specific attributes before running the program.\n-        """\n-        if ( self.getSubjectFile() == "" and not self.getOnlySsr() ) \\\n-               or ( self.getSubjectFile() != "" and self.getOnlySsr() ):\n-            string = "ERROR: need to specify -s or -m"\n-            print string\n-            print self.getHelpAsString()\n-            sys.exit(1)\n-        if self.getOutputFile() == "":\n-            if not self.getOnlySsr():\n-                self.setOutputFile( "%s.cat.align" % ( self.getInputFile() ) )\n-            else:\n-                self.s'..b'OutputFile() == "":\n-            if not self.getOnlySsr():\n-                self.setOutputFile( "%s.cat.align" % ( self.getInputFile() ) )\n-            else:\n-                self.setOutputFile( "%s.cat.path" % ( self.getInputFile() ) )\n-        self.appendFileToKeep( self.getOutputFile() )\n-        self.appendFileToKeep( "%s.cat" % ( self.getInputFile() ) )\n-        \n-        \n-    def setListFilesToRemove( self ):\n-        """\n-        Set the list of files to remove.\n-        """\n-        self.appendFileToRemove( "%s.stderr" % ( self.getInputFile() ) )\n-        self.appendFileToRemove( "%s.tbl" % ( self.getInputFile() ) )\n-        self.appendFileToRemove( "%s.ori.out" % ( self.getInputFile() ) )\n-        self.appendFileToRemove( "%s.masked" % ( self.getInputFile() ) )\n-        self.appendFileToRemove( "%s.out" % ( self.getInputFile() ) )\n-        self.appendFileToRemove( "%s.log" % ( self.getInputFile() ) )\n-        self.appendFileToRemove( "%s.ref" % ( self.getInputFile() ) )\n-        \n-        \n-    def convertCatIntoAlign( self ):\n-        """\n-        Convert a \'cat\' file into the \'align\' format.\n-        """\n-        cmd = os.environ["REPET_PATH"] + "/bin/RMcat2align.py"\n-        cmd += " -i %s.cat" % ( self.getInputFile() )\n-        cmd += " -o %s.cat.align" % ( self.getInputFile() )\n-        exitStatus = os.system( cmd )\n-        if exitStatus != 0:\n-            string = "ERROR while converting \'cat\' file into \'align\' format"\n-            print string\n-            sys.exit(1)\n-            \n-            \n-    def convertCatIntoPath( self ):\n-        """\n-        Convert a \'cat\' file into the \'path\' format.\n-        """\n-        cmd = os.environ["REPET_PATH"] + "/bin/RMcat2path.py"\n-        cmd += " -i %s.cat" % ( self.getInputFile() )\n-        cmd += " -o %s.cat.path" % ( self.getInputFile() )\n-        exitStatus = os.system( cmd )\n-        if exitStatus != 0:\n-            string = "ERROR while converting \'cat\' file into \'path\' format"\n-            print string\n-            sys.exit(1)\n-            \n-            \n-    def setSummary( self ):\n-        self._summary = "input file: %s" % ( self.getInputFile() )\n-        if self.getSubjectFile() != "":\n-            self._summary += "\\nsubject file: %s" % ( self.getSubjectFile() )\n-        self._summary += "\\nnb processors: %i" % ( self.getNbProcessors() )\n-        if self.getCalculateGCcontent():\n-            self._summary += "\\ncalculate the GC content"\n-        if self.getSkipBacterialIsCheck():\n-            self._summary += "\\nskip bacterial insertion element check"\n-        if self.getMaskSsr():\n-            self._summary += "\\nmask low-complexity DNA or simple repeats"\n-        if self.getOnlySsr():\n-            self._summary = "\\nonly masks low complex/simple repeats (no interspersed repeats)"\n-        if self.getOutputFile() == "":\n-            if not self.getMaskSsr():\n-                self.setOutputFile( "%s.cat.align" % ( self.getInputFile() ) )\n-            else:\n-                self.setOutputFile( "%s.cat.path" % ( self.getInputFile() ) )\n-        self._summary += "\\noutput file: %s" % ( self.getOutputFile() )\n-        \n-        \n-    def run( self ):\n-        """\n-        Run the program.\n-        """\n-        self.start()\n-        \n-        self.setProgramCommandLine()\n-        cmd = self.getProgramCommandLine()\n-        if self.getVerbosityLevel() > 0:\n-            print "LAUNCH: %s" % ( cmd )\n-            sys.stdout.flush()\n-        exitStatus = os.system( cmd )\n-        if exitStatus != 0:\n-            string = "ERROR: program \'%s\' returned exit status \'%i\'" % ( self.getProgramName(), exitStatus )\n-            print string\n-            sys.exit(1)\n-            \n-        if not self.getOnlySsr():\n-            self.convertCatIntoAlign()\n-        else:\n-            self.convertCatIntoPath()\n-            \n-        self.end()\n-        \n-        \n-if __name__ == "__main__":\n-    i = RepeatMaskerProgramLauncher()\n-    i.setAttributesFromCmdLine()\n-    i.run()\n'
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/YassClusterLauncher.py
--- a/commons/launcher/YassClusterLauncher.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,78 +0,0 @@
-#!/usr/bin/env python
-
-##@file
-# Launch YassProgramLauncher on several files in parallel on a cluster.
-
-
-from pyRepet.launcher.AbstractClusterLauncher import *
-from commons.core.coord.AlignUtils import AlignUtils
-from commons.launcher.YassProgramLauncher import YassProgramLauncher
-from commons.tools import srptBlasterMatcher
-
-
-class YassClusterLauncher( AbstractClusterLauncher ):
-    """
-    Launch Yass on several files in parallel on a cluster.
-    """
-    
-    def __init__( self ):
-        """
-        Constructor.
-        """
-        AbstractClusterLauncher.__init__( self )
-        AbstractClusterLauncher.setAcronym( self, "Yass" )
-        
-        self._cmdLineSpecificOptions = "s:p:A"
-        
-        self._exeWrapper = "YassProgramLauncher.py"
-        self._prgLauncher = None
-        self._prgLauncher = self.getProgramLauncherInstance()
-        
-        
-    def getSpecificHelpAsString( self ):
-        """
-        Return the specific help as a string.
-        """
-        string = ""
-        string += "\nspecific options:"
-        string += "\n     -s: name of the subject file (format='fasta')"
-        string += "\n     -p: parameters for 'yass'"
-        string += "\n     -Z: concatenate output files"
-        string += "\n     -A: same sequences (all-by-all)"
-        return string
-    
-    
-    def getSubjectFile( self ):
-        return self._prgLauncher.getSubjectFile()
-    
-    
-    def getProgramParameters( self ):
-        return self._prgLauncher.getProgramParameters()
-    
-    
-    def getProgramLauncherInstance( self ):
-        if self._prgLauncher == None:
-            self._prgLauncher = YassProgramLauncher()
-            self._prgLauncher.setInputFile( GENERIC_IN_FILE )
-            self._prgLauncher.setClean()
-            self._prgLauncher.setVerbosityLevel( 1 )
-            self._prgLauncher.setListFilesToKeep()
-            self._prgLauncher.setListFilesToRemove()
-        return self._prgLauncher
-    
-    
-    def processOutputFile( self, tmpFile, outFile ):
-        sortFile = "%s.sort" % ( tmpFile )
-        AlignUtils.sortAlignFile( tmpFile, sortFile )
-        if self._prgLauncher.getAllByAll():
-            srptBlasterMatcher.filterRedundantMatches( sortFile,
-                                                                  outFile )
-            os.remove( sortFile )
-        else:
-            os.rename( sortFile, outFile )
-            
-            
-if __name__ == "__main__":
-    i = YassClusterLauncher()
-    i.setAttributesFromCmdLine()
-    i.run()
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/YassProgramLauncher.py
--- a/commons/launcher/YassProgramLauncher.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,195 +0,0 @@
-#!/usr/bin/env python
-
-##@file
-# Launch Yass (pairwise alignment).
-#
-# options:
-#      -h: this help
-#      -i: name of the input file (queries, format='fasta')
-#      -s: name of the subject file (format='fasta')
-#      -p: parameters for 'yass' (default='-d 2')
-#      -o: name of the output file (format='align', default=inFile+'.align')
-#      -c: clean
-#      -v: verbosity level (default=0/1)
-
-
-import os
-import sys
-
-from pyRepet.launcher.AbstractProgramLauncher import AbstractProgramLauncher
-
-
-class YassProgramLauncher( AbstractProgramLauncher ):
-    """
-    Launch Yass (pairwise alignment).
-    """
-    
-    def __init__( self ):
-        """
-        Constructor.
-        """
-        AbstractProgramLauncher.__init__( self )
-        self._prgName = "yass"
-        self._formatInFile = "fasta"
-        self._sbjFile = ""
-        self._prgParam = ""
-        self._allByAll = False
-        self._cmdLineSpecificOptions = "s:p:Ao:"
-        
-        
-    def getSpecificHelpAsString( self ):
-        """
-        Return the specific help as a string.
-        """
-        string = ""
-        string += "\nspecific options:"
-        string += "\n     -s: name of the subject file (format='fasta')"
-        string += "\n     -p: parameters for '%s'" % ( self.getProgramName() )
-        string += "\n     -A: same sequences (all-by-all)"
-        string += "\n     -o: name of the output file (format='align', default=inFile+'.align')"
-        return string
-    
-    
-    def setASpecificAttributeFromCmdLine( self, o, a="" ):
-        """
-        Set a specific attribute from the command-line arguments.
-        """
-        if o =="-s":
-            self.setSubjectFile( a )
-        elif o == "-p":
-            self.setProgramParameters( a )
-        elif o == "-A":
-            self.setAllByAll()
-        elif o == "-o":
-            self.setOutputFile( a )
-            
-            
-    def setSubjectFile( self, arg ):
-        self._sbjFile = arg
-        
-        
-    def getSubjectFile( self ):
-        return self._sbjFile
-    
-    
-    def setAllByAll( self ):
-        self._allByAll = True
-        
-        
-    def getAllByAll( self ):
-        return self._allByAll
-    
-    
-    def checkSpecificAttributes( self ):
-        """
-        Check the specific attributes before running the program.
-        """
-        if self._sbjFile == "":
-            string = "ERROR: missing subject file (-s)"
-            print string
-            print self.getHelpAsString()
-            sys.exit(1)
-        if self.getOutputFile() == "":
-            self.setOutputFile( "%s.align" % ( self.getInputFile() ) )
-            
-            
-    def setWrapperCommandLine( self ):
-        """
-        Set the command-line of the wrapper.
-        Required for YassClusterLauncher.
-        """
-        self._wrpCmdLine = self.getWrapperName()
-        self._wrpCmdLine += " -i %s" % ( self.getInputFile() )
-        self._wrpCmdLine += " -s %s" % ( self.getSubjectFile() )
-        if self.getProgramParameters() != "":
-            self._wrpCmdLine += " -p '%s'" % ( self.getProgramParameters() )
-        if self.getAllByAll():
-            self._wrpCmdLine += " -A"
-        if self.getOutputFile() == "":
-            self.setOutputFile( "%s.align" % ( self.getInputFile() ) )
-        self._wrpCmdLine += " -o %s" % ( self.getOutputFile() )
-        if self.getClean():
-            self._wrpCmdLine += " -c"
-        self._wrpCmdLine += " -v %i" % ( self.getVerbosityLevel() )
-        
-        
-    def setProgramCommandLine( self ):
-        """
-        Set the command-line of the program.
-        """
-        self._prgCmdLine = self.getProgramName()
-        self._prgCmdLine += " -d 2"
-        if self.getProgramParameters() != "":
-            self._prgCmdLine += " %s" % ( self.getProgramParameters() )
-        self._prgCmdLine += " -o %s.blast" % ( self.getInputFile() )
-        self._prgCmdLine += " %s" % ( self.getInputFile() )
-        self._prgCmdLine += " %s" % ( self.getSubjectFile() )
-        
-        
-    def setListFilesToKeep( self ):
-        """
-        Set the list of files to keep.
-        """
-        if self.getOutputFile() == "":
-            self.setOutputFile( "%s.align" % ( self.getInputFile() ) )
-        self.appendFileToKeep( self.getOutputFile() )
-        
-        
-    def setListFilesToRemove( self ):
-        """
-        Set the list of files to remove.
-        """
-        pass
-    
-    
-    def convertBlastIntoAlign( self ):
-        """
-        Convert a 'blast' file into the 'align' format.
-        """
-        cmd = os.environ["REPET_PATH"] + "/bin/blast2align.py"
-        cmd += " -i %s.blast" % ( self.getInputFile() )
-        cmd += " -o %s" % ( self.getOutputFile() )
-        exitStatus = os.system( cmd )
-        if exitStatus != 0:
-            string = "ERROR while converting 'blast' file into 'align' format"
-            print string
-            sys.exit(1)
-            
-            
-    def setSummary( self ):
-        self._summary = "input file: %s" % ( self.getInputFile() )
-        self._summary += "\nsubject file: %s" % ( self.getSubjectFile() )
-        self._summary += "\nparameters: %s" % ( self.getProgramParameters() )
-        if self.getAllByAll():
-            self._summary += "\nall-by-all"
-        if self.getOutputFile() == "":
-            self.setOutputFile( "%s.align" % ( self.getInputFile() ) )
-        self._summary += "\noutput file: %s" % ( self.getOutputFile() )
-        
-        
-    def run( self ):
-        """
-        Run the program.
-        """
-        self.start()
-        
-        self.setProgramCommandLine()
-        cmd = self.getProgramCommandLine()
-        if self.getVerbosityLevel() > 0:
-            print "LAUNCH: %s" % ( cmd )
-            sys.stdout.flush()
-        exitStatus = os.system( cmd )
-        if exitStatus != 0:
-            string = "ERROR: program '%s' returned exit status '%i'" % ( self.getProgramName(), exitStatus )
-            print string
-            sys.exit(1)
-            
-        self.convertBlastIntoAlign()
-        
-        self.end()
-        
-        
-if __name__ == "__main__":
-    i = YassProgramLauncher()
-    i.setAttributesFromCmdLine()
-    i.run()
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/launchBlasterMatcherPerQuery.py
--- a/commons/launcher/launchBlasterMatcherPerQuery.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,196 +0,0 @@
-#!/usr/bin/env python
-
-"""
-This program splits the input fasta file in a given number of files, launch Blaster and/or Matcher on them in parallel and collect the results afterwards.
-"""
-
-import os
-import sys
-import getopt
-import exceptions
-import logging
-import ConfigParser
-
-if not os.environ.has_key( "REPET_PATH" ):
-    print "*** Error: no environment variable REPET_PATH"
-    sys.exit(1)
-sys.path.append( os.environ["REPET_PATH"] )
-
-import pyRepet.launcher.programLauncher
-import pyRepet.seq.fastaDB
-
-#-----------------------------------------------------------------------------
-
-def help():
-
-    """
-    Give the list of the command-line options.
-    """
-
-    print
-    print "usage:",sys.argv[0]," [ options ]"
-    print "options:"
-    print "     -h: this help"
-    print "     -q: fasta filename of the queries"
-    print "     -s: fasta filename of the subjects (same as queries if not specified)"
-    print "     -Q: queue name on the cluster"
-    print "     -d: absolute path to the temporary directory"
-    print "     -C: configuration file"
-    print "     -n: max. number of jobs (default=10,given a min. of 1 query per job)"
-    print "     -m: mix of Blaster and/or Matcher"
-    print "         1: launch Blaster only"
-    print "         2: launch Matcher only (on '*.align' query files)"
-    print "         3: launch Blaster+Matcher in the same job (default)"
-    print "     -B: parameters for Blaster (e.g. \"-a -n tblastx\")"
-    print "     -M: parameters for Matcher (e.g. \"-j\")"
-    print "     -Z: collect all the results into a single file (format 'align', 'path' or 'tab')"
-    print "     -c: clean"
-    print "     -v: verbose (default=0/1/2)"
-    print
-
-#-----------------------------------------------------------------------------
-
-def main():
-
-    """
-    This program splits the input fasta file in a given number of files, launch Blaster and/or Matcher on them in parallel and collect the results afterwards.
-    """
-
-    qryFileName = ""
-    sbjFileName = ""
-    queue = ""
-    tmpDir = ""
-    configFileName = ""
-    maxNbJobs = 10
-    minQryPerJob = 1
-    mix = "3"
-    paramBlaster = ""
-    paramMatcher = ""
-    collectFormat = ""
-    clean = False
-    verbose = 0
-
-    try:
-        opts, args = getopt.getopt(sys.argv[1:],"hq:s:Q:d:C:n:m:B:M:Z:cv:")
-    except getopt.GetoptError, err:
-        print str(err)
-        help()
-        sys.exit(1)
-    for o,a in opts:
-        if o == "-h":
-            help()
-            sys.exit(0)
-        elif o == "-q":
-            qryFileName = a 
-        elif o == "-s":
-            sbjFileName = a
-        elif o == "-Q":
-            queue = a
-        elif o == "-d":
-            tmpDir = a
-        elif o == "-C":
-            configFileName = a
-        elif o == "-n":
-            maxNbJobs = int(a)
-        elif o == "-m":
-            mix = a
-        elif o == "-B":
-            paramBlaster = a
-        elif o == "-M":
-            paramMatcher = a
-        elif o == "-Z":
-            collectFormat = a
-        elif o == "-c":
-            clean = True
-        elif o == "-v":
-            verbose = int(a)
-
-    if qryFileName == "" or configFileName == "" or collectFormat == "":
-        print "*** Error: missing compulsory options"
-        help()
-        sys.exit(1)
-
-    if verbose > 0:
-        print "\nbeginning of %s" % (sys.argv[0].split("/")[-1])
-        sys.stdout.flush()
-
-    if not os.path.exists( qryFileName ):
-        print "*** Error: query file '%s' doesn't exist" % ( qryFileName )
-        sys.exit(1)
-    if sbjFileName != "":
-        if not os.path.exists( sbjFileName ):
-            print "*** Error: subject file '%s' doesn't exist" % ( sbjFileName )
-            sys.exit(1)
-    else:
-        sbjFileName = qryFileName
-
-    pL = pyRepet.launcher.programLauncher.programLauncher()
-
-    nbSeqQry = pyRepet.seq.fastaDB.dbSize( qryFileName )
-    qryPerJob = nbSeqQry / float(maxNbJobs)
-
-    # split the input query file in single files into a new directory
-    prg = os.environ["REPET_PATH"] + "/bin/dbSplit.py"
-    cmd = prg
-    cmd += " -i %s" % ( qryFileName )
-    if qryPerJob <= 1.0:
-        cmd += " -n %i" % ( minQryPerJob )
-    else:
-        cmd += " -n %i" % ( qryPerJob + 1 )
-    cmd += " -d"
-    pL.launch( prg, cmd )
-
-    # prepare the subject databank
-    if sbjFileName != qryFileName:
-        prg = "blaster"
-        cmd = prg
-        cmd += " -q %s" % ( sbjFileName )
-        cmd += " -P"
-        pL.launch( prg, cmd )
-
-    # launch Blaster+Matcher in parallel
-    prg = "srptBlasterMatcher.py"
-    cmd = prg
-    cmd += " -g %s_vs_%s" % ( qryFileName, sbjFileName )
-    cmd += " -q %s/batches" % ( os.getcwd() )
-    cmd += " -s %s/%s" % ( os.getcwd(), sbjFileName )
-    cmd += " -Q '%s'" % ( queue )
-    if tmpDir != "":
-        cmd += " -d %s" % ( tmpDir )
-    cmd += " -m %s" % ( mix )
-    if paramBlaster != "":
-        cmd += " -B \"%s\"" % ( paramBlaster )
-    if paramMatcher != "":
-        cmd += " -M \"%s\"" % ( paramMatcher )
-    cmd += " -Z %s" % ( collectFormat )
-    cmd += " -C %s" % ( configFileName )
-    if clean == True:
-        cmd += " -c"
-    cmd += " -v %i" % ( verbose - 1 )
-    pL.launch( prg, cmd )
-
-    suffix = ""
-    if mix in ["2","3"]:
-        if "-a" in paramMatcher:
-            suffix = "match.%s" % ( collectFormat )
-        else:
-            suffix = "clean_match.%s" % ( collectFormat )
-        os.system( "mv %s_vs_%s.%s %s_vs_%s.align.%s" % ( qryFileName, sbjFileName, collectFormat, qryFileName, sbjFileName, suffix ) )
-
-    # clean
-    if clean == True:
-        prg = "rm"
-        cmd = prg
-        cmd += " -rf batches formatdb.log %s_cut* %s.Nstretch.map" % ( sbjFileName, sbjFileName )
-        pL.launch( prg, cmd )
-
-    if verbose > 0:
-        print "%s finished successfully\n" % (sys.argv[0].split("/")[-1])
-        sys.stdout.flush()
-
-    return 0
-
-#----------------------------------------------------------------------------
-
-if __name__ == '__main__':
-    main()
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/launchMafft.py
--- a/commons/launcher/launchMafft.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,104 +0,0 @@
-#!/usr/bin/env python
-
-# DEPRECATED
-
-import user, os, sys, getopt, exceptions
-
-if not os.environ.has_key( "REPET_PATH" ):
-    print "*** Error: no environment variable REPET_PATH"
-    sys.exit(1)
-sys.path.append( os.environ["REPET_PATH"] )
-
-import pyRepet.launcher.programLauncher
-import pyRepet.seq.fastaDB
-from pyRepet.seq.BioseqDB import *
-
-#------------------------------------------------------------------------------
-
-def help():
-
-    print
-    print "DEPRECATED"
-    print
-    print "usage: ",sys.argv[0],"[ options ]"
-    print "options:"
-    print "     -h: this help"
-    print "     -i: name of the input file (format='fasta')"
-    print "     -o: name of the output file (default=inFileName+'.fa_aln')"
-    print "     -v: verbose (default=0/1)"
-    print
-
-#------------------------------------------------------------------------------
-
-def main():
-    
-    """
-    This program launches MAFFT to build a multiple sequence alignment.
-    """
-
-    inFileName = ""
-    outFileName = ""
-    verbose = 0
-    
-    try:
-        opts,args=getopt.getopt(sys.argv[1:],"hi:o:v:")
-    except getopt.GetoptError:
-        help()
-        sys.exit(1)
-    for o,a in opts:
-        if o == "-h":
-            help()
-            sys.exit(0)
-        elif o == "-i":
-            inFileName = a
-        elif o == "-o":
-            outFileName = a
-        elif o == "-v":
-            verbose = int(a)
-            
-    if inFileName == "":
-        print "*** Error: missing compulsory options"
-        help()
-        sys.exit(1)
-        
-    if verbose > 0:
-        print "beginning of %s" % (sys.argv[0].split("/")[-1])
-        sys.stdout.flush()
-        
-    if verbose > 0:
-        print "build a multiple alignment from '%s'..." % ( inFileName )
-        sys.stdout.flush()
-        
-    pyRepet.seq.fastaDB.shortenSeqHeaders( inFileName )
-    
-    bsDB = BioseqDB( inFileName+".shortH" )
-    bsDB.upCase()
-    bsDB.save( inFileName+".shortHtmp" )
-    del bsDB
-    os.rename( inFileName+".shortHtmp", inFileName+".shortH" )
-    
-    pL = pyRepet.launcher.programLauncher.programLauncher( inFileName+".shortH" )
-    pL.launchMafft( outFileName=inFileName+".shortH.fa_aln", verbose=verbose )
-    
-    pyRepet.seq.fastaDB.retrieveInitSeqHeaders( inFileName+".shortH.fa_aln",
-                                                inFileName+".shortHlink",
-                                                inFileName+".shortH.fa_aln.initH",
-                                                verbose-1 )
-    
-    if outFileName == "":
-        outFileName = "%s.fa_aln" % ( inFileName )
-    os.system( "mv %s.shortH.fa_aln.initH %s" % ( inFileName, outFileName ) )
-    
-    for f in [inFileName+".shortH",inFileName+".shortH.fa_aln",inFileName+".shortHlink"]:
-        os.remove( f )
-        
-    if verbose > 0:
-        print "%s finished successfully" % (sys.argv[0].split("/")[-1])
-        sys.stdout.flush()
-        
-    return 0
-
-#------------------------------------------------------------------------------
-
-if __name__ == '__main__':
-    main()
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/launchMreps.py
--- a/commons/launcher/launchMreps.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,140 +0,0 @@
-#!/usr/bin/env python
-
-from commons.core.seq.BioseqDB import BioseqDB
-from commons.core.parsing.MrepsToSet import MrepsToSet
-import subprocess
-import os
-import sys
-import getopt
-
-def help():
-    """
-    Give the list of the command-line options.
-    """
-    print
-    print "usage: ",sys.argv[0],"[ options ]"
-    print "options:"
-    print "     -h: this help"
-    print "     -i: name of the input file (format='fasta')"
-    print "     -o: name of the output file (default=inFileName+'.Mreps.set')"
-    print "     -f: error filter (default=1.0)"
-    print "     -c: clean"
-    print "     -v: verbosity level (default=0/1)"
-    print
-
-def main():
-    """
-    Launch Mreps.
-    """
-    inFileName = ""
-    outFileName = ""
-    errorFilter = 1.0
-    clean = False
-    verbose = 0
-
-    try:
-        opts=getopt.getopt(sys.argv[1:],"hi:o:f:cv:")[0]
-    except getopt.GetoptError, err:
-        print str(err)
-        help()
-        sys.exit(1)
-    for o,a in opts:
-        if o == "-h":
-            help()
-            sys.exit(0)
-        elif o == "-i":
-            inFileName = a
-        elif o == "-o":
-            outFileName = a
-        elif o == "-f":
-            errorFilter = float(a)
-        elif o == "-c":
-            clean = True
-        elif o == "-v":
-            verbose = int(a)
-
-    if inFileName == "":
-        print "ERROR: missing compulsory options"
-        help()
-        sys.exit(1)
-
-    if verbose > 0:
-        print "beginning of %s" % (sys.argv[0].split("/")[-1])
-        sys.stdout.flush()
-
-    # Mreps 2.5 doesn't fully support IUPAC nomenclature
-    if verbose > 0:
-        print "* check IUPAC symbols"; sys.stdout.flush()
-    tmpInFileName = "%s.tmp%i" % ( inFileName, os.getpid() )
-    if os.path.exists( tmpInFileName ):
-        os.system( "rm -f %s" % ( tmpInFileName ) )
-    bsDB = BioseqDB( inFileName )
-    for bs in bsDB.db:
-        if verbose > 0:
-            print bs.header; sys.stdout.flush()
-        bs.partialIUPAC()
-        onlyN = True
-        for nt in ["A","T","G","C"]:
-            if nt in bs.sequence:
-                onlyN = False
-        if onlyN == True:
-            if verbose > 0:
-                print "** Warning: only Ns"; sys.stdout.flush()
-        else:
-            bsDB.save( tmpInFileName )
-
-    if not os.path.exists( tmpInFileName ):
-        sys.exit(0)
-
-    if verbose > 0:
-        print "* remove N stretches"; sys.stdout.flush()
-    prg = os.environ["REPET_PATH"] + "/bin/cutterDB"
-    cmd = prg
-    cmd += " -l 200000"
-    cmd += " -o 0"
-    cmd += " -w 11"
-    cmd += " %s" % ( tmpInFileName )
-    if verbose > 0:
-        print cmd; sys.stdout.flush()
-    log = os.system( cmd )
-    if log != 0:
-        print "ERROR: %s returned %i" % ( prg, log )
-        sys.exit(1)
-
-    # launch Mreps on the input file
-    MrepsOutFileName = "%s.Mreps.xml" % ( tmpInFileName )
-    prg = "mreps"
-    cmd = prg
-    cmd += " -res 3"
-    cmd += " -exp 3.0"
-    cmd += " -maxsize 50"
-    cmd += " -xmloutput %s" % MrepsOutFileName
-    cmd += " -fasta %s_cut" % tmpInFileName
-    process = subprocess.Popen(cmd, shell = True)
-    process.communicate()
-    if process.returncode != 0:
-        raise Exception("ERROR when launching '%s'" % cmd)
-
-    if outFileName == "":
-        outFileName = inFileName + ".Mreps.set"
-
-    # parse Mreps results in xml format
-    iMrepsToSet = MrepsToSet(inFileName, MrepsOutFileName, outFileName, errorFilter)
-    iMrepsToSet.run()
-    if clean:
-        iMrepsToSet.clean()
-
-    # remove temporary input filename
-    os.remove(tmpInFileName)
-    os.remove("%s_cut" % tmpInFileName)
-    os.remove("%s.Nstretch.map" % tmpInFileName)
-
-    if verbose > 0:
-        print "%s finished successfully\n" % (sys.argv[0].split("/")[-1])
-        sys.stdout.flush()
-
-    return 0
-
-
-if __name__ == '__main__':
-    main()
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/launchPhyML.py
--- a/commons/launcher/launchPhyML.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,87 +0,0 @@
-#!/usr/bin/env python
-
-import os
-import sys
-import getopt
-
-from pyRepet.launcher.programLauncher import programLauncher
-from commons.tools.ChangeSequenceHeaders import ChangeSequenceHeaders
-
-
-def help():
-    print
-    print "usage: ",sys.argv[0],"[ options ]"
-    print "options:"
-    print "     -h: this help"
-    print "     -i: name of the input file (aligned fasta)"
-    print "     -c: clean"
-    print "     -v: verbose (default=0)"
-    print
-    
-    
-def main():
-    
-    inFileName = ""
-    clean = False
-    verbose = 0
-    try:
-        opts,args=getopt.getopt(sys.argv[1:],"hi:cv:")
-    except getopt.GetoptError, err:
-        print str(err)
-        help(); sys.exit(1)
-    for o,a in opts:
-        if o == "-h":
-            help(); sys.exit(0)
-        elif o == "-i":
-            inFileName = a
-        elif o == "-c":
-            clean = True
-        elif o == "-v":
-            verbose = int(a)
-    if inFileName == "":
-        print "ERROR: missing compulsory options"
-        help(); sys.exit(1)
-
-    if verbose > 0:
-        print "START %s" % (sys.argv[0].split("/")[-1])
-        sys.stdout.flush()
-        
-    csh = ChangeSequenceHeaders()
-    csh.setInputFile( inFileName )
-    csh.setFormat( "fasta" )
-    csh.setStep( 1 )
-    csh.setPrefix( "seq" )
-    csh.setLinkFile( inFileName+".shortHlink" )
-    csh.setOutputFile( inFileName+".shortH" )
-    csh.run()
-    
-    pL = programLauncher( inFileName+".shortH" )
-    
-    pL.launchSreformat( outFormat="phylip", outFileName=inFileName+".shortH.phylip", verbose=verbose )
-    
-    pL.reset( inFileName+".shortH.phylip" )
-    
-    pL.launchPhyML( verbose=verbose )
-    
-    csh.setInputFile( inFileName+".shortH.phylip_phyml_tree.txt" )
-    csh.setFormat( "newick" )
-    csh.setStep( 2 )
-    csh.setLinkFile( inFileName+".shortHlink" )
-    csh.setOutputFile( inFileName+"_phyml.newick" )
-    csh.run()
-    
-    if clean:
-        for f in [ inFileName+".shortH", inFileName+".shortHlink", inFileName+".shortH.phylip",
-                   inFileName+".shortH.phylip_phyml_lk.txt", inFileName+".shortH.phylip_phyml_tree.txt" ]:
-            os.remove( f )
-        os.system( "mv %s.shortH.phylip_phyml_stat.txt %s_phyml.txt" % ( inFileName, inFileName ) )
-
-    if verbose > 0:
-        print "END %s" % (sys.argv[0].split("/")[-1])
-        sys.stdout.flush()
-
-    return 0
-
-
-if __name__ == "__main__":
-    main()
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/launchPrank.py
--- a/commons/launcher/launchPrank.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,85 +0,0 @@
-#!/usr/bin/env python
-
-import os
-import sys
-import getopt
-
-from pyRepet.launcher.programLauncher import programLauncher
-
-
-def help():
-    print
-    print "usage: launchPrank.py [ options ]"
-    print "options:"
-    print "     -h: this help"
-    print "     -i: name of the input file (format=fasta)"
-    print "     -o: name of the output file (format=aligned fasta, default='inFileName'+fa_aln)"
-    print "     -P: Prank's parameters"
-    print "     -c: clean"
-    print "     -v: verbose (default=0/1)"
-    print
-
-
-def main():
-    """
-    Launch PRANK.
-    """
-    inFileName = ""
-    outFileName = ""
-    parameters = ""
-    clean = False
-    verbose = 0
-
-    try:
-        opts, args = getopt.getopt( sys.argv[1:], "hi:o:P:cv:" )
-    except getopt.GetoptError, err:
-        print str(err)
-        help()
-        sys.exit(1)
-    for o,a in opts:
-        if o == "-h":
-            help()
-            sys.exit(0)
-        elif o == "-i":
-            inFileName = a
-        elif o == "-o":
-            outFileName = a
-        elif o == "-P":
-            parameters = a
-        elif o == "-c":
-            clean = True
-        elif o == "-v":
-            verbose = int(a)
-
-    if inFileName == "":
-        print "ERROR: missing input file (-i)"
-        help()
-        sys.exit(1)
-
-    if not os.path.exists( inFileName ):
-        print "ERROR: can't find file '%s'" % ( inFileName )
-        help()
-        sys.exit(1)
-
-    if verbose > 0:
-        print "START %s" % ( sys.argv[0].split("/")[-1] )
-        sys.stdout.flush()
-
-    if outFileName == "":
-        outFileName = "%s.fa_aln" % ( inFileName )
-
-    pL = programLauncher( inFileName )
-    returnStatus = pL.launchPrank( outFileName, parameters, "yes", verbose )
-    if returnStatus != 0:
-        print "ERROR: launchPrank() returned '%i'" % ( returnStatus )
-        sys.exit(1)
-
-    if verbose > 0:
-        print "END %s" % ( sys.argv[0].split("/")[-1] )
-        sys.stdout.flush()
-
-    return 0
-
-
-if __name__ == "__main__":
-    main()
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/launchTCoffee.py
--- a/commons/launcher/launchTCoffee.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,78 +0,0 @@
-#!/usr/bin/env python
-
-import os
-import sys
-import getopt
-import exceptions
-
-if not os.environ.has_key( "REPET_PATH" ):
-    print "ERROR: no environment variable REPET_PATH"
-    sys.exit(1)
-sys.path.append( os.environ["REPET_PATH"] )
-
-from pyRepet.launcher.programLauncher import programLauncher
-
-
-def help():
-    print
-    print "usage: ",sys.argv[0],"[ options ]"
-    print "options:"
-    print "     -h: this help"
-    print "     -i: name of the input file (format='fasta')"
-    print "     -P: parameters"
-    print "     -o: name of the output file (format='aligned fasta', default='inFileName'+fa_aln)"
-    print "     -c: clean"
-    print "     -v: verbosity level (default=0/1)"
-    print
-
-
-def main():
-
-    inFileName = ""
-    parameters = ""
-    outFileName = ""
-    clean = False
-    verbose = 0
-    
-    try:
-        opts, args = getopt.getopt(sys.argv[1:],"hi:P:o:cv:")
-    except getopt.GetoptError, err:
-        print str(err); help(); sys.exit(1)
-    for o,a in opts:
-        if o == "-h":
-            help(); sys.exit(0)
-        elif o == "-i":
-            inFileName = a
-        elif o == "-P":
-            parameters = a
-        elif o == "-o":
-            outFileName = a
-        elif o == "-c":
-            clean = True
-        elif o == "-v":
-            verbose = "yes"
-            
-    if inFileName == "" and parameters == "":
-        print "ERROR: missing compulsory options"
-        help()
-        sys.exit(1)
-        
-    if outFileName == "":
-        outFileName = "%s.fa_aln" % ( inFileName )
-        
-    if verbose > 0:
-        print "START %s" % (sys.argv[0].split("/")[-1])
-        sys.stdout.flush()
-        
-    pL = programLauncher( inFileName )
-    pL.launchTcoffee( outFileName, parameters )
-    
-    if verbose > 0:
-        print "END %s" % (sys.argv[0].split("/")[-1])
-        sys.stdout.flush()
-    
-    return 0
-
-
-if __name__ == "__main__":
-    main()
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/launchTEclass.py
--- a/commons/launcher/launchTEclass.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,138 +0,0 @@
-#!/usr/bin/env python
-
-import os
-import sys
-import getopt
-import glob
-import shutil
-
-
-def help():
-    print
-    print "usage: %s [ options ]" % ( sys.argv[0].split("/")[-1] )
-    print "options:"
-    print "     -h: this help"
-    print "     -i: name of the input file (format='fasta')"
-    print "     -o: name of the output file (format='map', default=inFileName+'.map')"
-    print "     -c: clean"
-    print "     -v: verbosity level (default=0/1)"
-    print
-
-def parseFastaFileFromTEclass( inFile, outFile, verbose=0 ):
-    tmpHandler = open( inFile, "r" )
-    outHandler = open( outFile, "w" )
-    dClassif2Count = {}
-    header = ""
-    classif = ""
-    while True:
-        line = tmpHandler.readline()
-        if line == "":
-            break
-        if line[0] == ">":
-            header = line[1:].split("|")[0]
-            classif = line[1:-1].split(": ")[1].split("|")[0]
-            if not dClassif2Count.has_key( classif ):
-                dClassif2Count[ classif ] = 0
-            dClassif2Count[ classif ] += 1
-        else:
-            seqLength = len(line[:-1])
-            outHandler.write( "%s\t%s\t%i\t%i\n" % ( classif, header, 1, seqLength ) )
-    tmpHandler.close()
-    outHandler.close()
-    if verbose > 0:
-        for classif in dClassif2Count.keys():
-            print "%s: %i sequences" % ( classif, dClassif2Count[ classif ] )
-            sys.stdout.flush()
-            
-            
-def main():
-    """
-    Launch TEclass to classify TE sequences.
-    """
-    inFileName = ""
-    outFileName = ""
-    clean = False
-    verbose = 0
-
-    try:
-        opts, args = getopt.getopt( sys.argv[1:], "hi:o:cv:" )
-    except getopt.GetoptError, err:
-        print str(err)
-        help()
-        sys.exit(1)
-    for o,a in opts:
-        if o == "-h":
-            help()
-            sys.exit(0)
-        elif o == "-i":
-            inFileName = a
-        elif o == "-o":
-            outFileName = a
-        elif o == "-c":
-            clean = True
-        elif o == "-v":
-            verbose = int(a)
-            
-    if inFileName == "":
-        print "ERROR: missing input file (-i)"
-        help()
-        sys.exit(1)
-    if not os.path.exists( inFileName ):
-        print "ERROR: can't find input file '%s'" % ( inFileName )
-        help()
-        sys.exit(1)
-    if outFileName == "":
-        outFileName = "%s.TEclass.map" % ( inFileName )
-        
-    if verbose > 0:
-        print "START %s" % ( sys.argv[0].split("/")[-1] )
-        sys.stdout.flush()
-        
-    if verbose > 0:
-        print "launch TEclass..."
-        sys.stdout.flush()
-    prg = "test_consensi_2.1.pl"
-    cmd = prg
-    cmd += " %s" % ( inFileName )
-    returnValue = os.system( cmd )
-    if returnValue != 0:
-        print "ERROR: '%s' returned %i" % ( prg, returnValue )
-        sys.exit(1)
-        
-    lOut1 = glob.glob( "%s_*" % ( inFileName ) )
-    outDir = ""
-    for i in lOut1:
-        if os.path.isdir( i ):
-            lOut2 = glob.glob( "%s/*" % ( i ) )
-            if len(lOut2) == 4 and "%s/%s.lib" % ( i, inFileName ) in lOut2:
-                outDir = i
-                break
-    if outDir == "":
-        print "ERROR: can't find output directory"
-        sys.exit(1)
-    os.chdir( outDir )
-    
-    if verbose > 0:
-        print "parse the results..."
-        sys.stdout.flush()
-    parseFastaFileFromTEclass( "%s.lib" % ( inFileName ),
-                               outFileName,
-                               verbose )
-    os.system( "mv %s .." % ( outFileName ) )
-    os.chdir( ".." )
-    
-    if clean:
-        if verbose > 0:
-            print "clean the temporary files..."
-            sys.stdout.flush()
-        shutil.rmtree( outDir )
-        
-    if verbose > 0:
-        print "END %s" % ( sys.argv[0].split("/")[-1] )
-        sys.stdout.flush()
-        
-    return 0
-
-
-if __name__ == "__main__":
-    main()
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/tests/MockDataBankForBlat.py
--- a/commons/launcher/tests/MockDataBankForBlat.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
b"@@ -1,299 +0,0 @@\n-class MockDataBankForBlat(object):\n-\t\n-\tdef write(self, inFileName):\n-\t\tf = open(inFileName, 'w')\n-\t\tf.write('>Vein_ctg_2286\\n')\n-\t\tf.write('AGCAAAAaCGTATTTTCTAAGCTAAAATTTAGCGTAGAAGCTTGGACTCGCTtATTTTTT\\n')\n-\t\tf.write('ATCCTAGGAATTAGTAGAATCTCTCTATAAATATTTATTTTTTATCCGCGCAAAGCTAGG\\n')\n-\t\tf.write('AAACTATAGAATCTTATATATTAGTATATTCTAGCGATTATCTAGAGATTGTaGGGGGGG\\n')\n-\t\tf.write('ggAAAGGTAGTAATAGGCGTGTAAGAGAGATAAAGAGTTtATCTTAGAATCTCCCTACGC\\n')\n-\t\tf.write('CAAGCGAGATTCCTAAGGTAAGAATCCTAAGGTAAAGAATCTAAGCGAGAATTTAGAATC\\n')\n-\t\tf.write('ACGTGCTCGCTTCCTACTACCGTAATTTTACGGTTATAGAGTACGACAGTTCCTATATAT\\n')\n-\t\tf.write('AACCTATACTTATAACAACGAATATAaTATAAGACGTTAATTTGATTTTTTACCGTGTTA\\n')\n-\t\tf.write('CTTATAATAAGGTGTCCCAAAGTTGTTCGAATTTTTTTTGTCCAAGATTGAATACGGTGT\\n')\n-\t\tf.write('TGGTCATGTGATAGTATTTTCACGGTATTTAAACGGAAATTTTACCTACGGCCCCCcGCC\\n')\n-\t\tf.write('TATGTACATCATGAGGATGCACGATGGAGATGAAATGCTTCGTTTCATACTGAGTGGCCG\\n')\n-\t\tf.write('ATTGATGGACGCGTGAACGTCAAAGTAACTTCCATTTGTTTCCTGTCGTTGTCCGGTAGC\\n')\n-\t\tf.write('CTGGCAAATAGTGACATGTTTGATGTCTTTGGAACAGGGTGGAAACTTTTTTTGGGTtGC\\n')\n-\t\tf.write('AAATCGTCAAGAGTCACGTGTCCACACAGTGGCGCAAGTGGGGGCTTAAAATGGTGGACT\\n')\n-\t\tf.write('TGCGCGAGGGCGATTTCTTTTCTTCCCCAACCACAATCTATCGTGATCAAAGAAGCACCC\\n')\n-\t\tf.write('ATCCGGTTGTTGAGGTATGCCAGCCAGCATCCAATGATGCGCTCAAACAACAACTAACTC\\n')\n-\t\tf.write('TCATACAGATCGCCATGCAGATTTTCGTGAAGACCCTCACGGGCAAGACTATCACCCTcG\\n')\n-\t\tf.write('AGGTGGAGTCCTCCGACACCATTGACAATGTCAAGACCAAGATTCAGGGTACGTGGCCTC\\n')\n-\t\tf.write('GCGCAAGCATTTGTAACCATCTTCTAACCCTCTGCCGTAGACAAGGAAGgAATCCCCCCA\\n')\n-\t\tf.write('GACCAGCAGCGCTTGATCTTCGCCGGCAAGCAGCTCGAAGATGGACGCACCCTATCGGAC\\n')\n-\t\tf.write('TACAACATCCAGAAGGAGTCGACCCTCCACCTCGTCCTCCGACTCCGTGGTGGTATGGCC\\n')\n-\t\tf.write('AAGAaGCGCAAGAAGAAGGTCTACACCACCCcAAAGAaGATCAAGCACAAGCGCAAGAaG\\n')\n-\t\tf.write('ACCAAGTTGGCTGTCcTCAAGTACTACAAGGTGGATGGCGATGGAAAgaTCGAGcGCcTC\\n')\n-\t\tf.write('CGACGAGAGTGCCcAGCTGACGAGTGTGGTgCCGGTgTCTTCATGGCTGCCATGCACAAC\\n')\n-\t\tf.write('CGtcAATACTGCGGAAAGTGCCACCTCACCtACGTTTTCGACGAGAGCAAGTAGACGGTT\\n')\n-\t\tf.write('CTGGAAAGCATACAATGACAACCATGATTATGCTGTGGGATGATGGATGCTGAACAAAGG\\n')\n-\t\tf.write('GAGGGAATAGCGACGGACACCGCGTTCTGTAGCTACACAATCAAGCAAAACCTTCACCTC\\n')\n-\t\tf.write('GATAGCGGGCCTCGATCCATGTACTATCTTATGATATGTGACATTGAATGTGCGAGTGTT\\n')\n-\t\tf.write('CATTATTCTTTCGCCGTAGCTTCGTTCTCTCTGTGTTCACCCAACCTCCAAGAATCCCGA\\n')\n-\t\tf.write('CAGTTTCTGGCGATGTTCAAGAATGATATTGCCAGAAATTTATCGGTACCGAACCCTAGA\\n')\n-\t\tf.write('TAAAAGGATGGGTTCGGAGTTAACGTAATTTCGAAGGGCAGATGCCATGTGCTTGGGTGC\\n')\n-\t\tf.write('CGCGTTACGAGAATTACTATGATGGTGCTGTGTATCTTCACAATGGCAACATGGCAGAAC\\n')\n-\t\tf.write('AACGCCAAGAAGTTTCTCCAATGTCAACCCAAGGTCTCCGGACGAATCTAGATGCACCCT\\n')\n-\t\tf.write('GACTGCATCGTTATCGGTCATGCAAAAGCACGCCTAATGTGCAGCGTGATGACAAGGTGG\\n')\n-\t\tf.write('AAAaGGAGGCAAATGCTGGTCTAGTGTCTTGTGGCAGAAGTCAGAGTCACGATGAGCAAG\\n')\n-\t\tf.write('CATGGCGCATGAGGGTTGCCTCCGCAAGCATCCGACAGAGTAGAGACAGAGAAAACACCA\\n')\n-\t\tf.write('CAGCAAAAGATGTCACGGCACTCTCGATTCGCTTGTGACGGCCAAGTCTAGGTCCAGGTC\\n')\n-\t\tf.write('CAGGTCCAGGATACGGATACAAGGCGAATGTGGACACCCCAGCCTCCCGATTAGGGAACT\\n')\n-\t\tf.write('ATACAGCGGGCTGGGTTTATGAATAATGAATCCAATTGCAGCATGAGATCATAGCGTTTG\\n')\n-\t\tf.write('TCTAAGAGGCTTTTTGCTACTGTACATGGCGATTGGCGAGTGTTGGGGGTTAGGTGAGAC\\n')\n-\t\tf.write('GGTCTTGGCTGGCAACCCTGTGAGCGCAAAGATGGAGAAGGGAATGGCAGGCGATCAGGA\\n')\n-\t\tf.write('CGATTGTTTCATGGATGAGCAATGGGCATCTCAAaGAAACACGGATCGTTTCTGATGGAC\\n')\n-\t\tf.write('AGACGGGCCAAGACTGACCAAGCATTTGTGAAATTGGGACAGGAGAAGGGATGGTGGCTT\\n')\n-\t\tf.write('CGACGTGCTGCAGCTGCATACTGTGTAGCTGCGTGTTGATAGCTGCACAACTGCATTGGC\\n')\n-\t\tf.write('TCGACCAGACACATTCCCGGAGCGTTATGCATCCAGCGCCTGATTCGCTTGGGACTTGGG\\n')\n-\t\tf.write('TCGCGACTCGCGAGAGAATTGGTACTCGTAGTCGGTACCTAAGCTGCACCTTGTCCCCGA\\n')\n-\t\tf.write('AGTAGACTGTCGAGACTGTATAGtAGAGGTCGAGGTATATTCTATGCTATACTGTACATT\\n')\n-\t\tf.write('ATTGAAGTGCTCCCATCATATCACCAACCCTCCCGCCTCGTCTTCCATGTCcGTTTCCGC\\n')\n-\t\tf.write('CTTCACATTTCAAAAAGTCGTTGAGTGGTCCTAGTGCTCAATTAAATTGCTTACCAGAGC\\n')\n-\t\tf.write('GTCAGAGCTCTCCTGGAGTCCTGGCAAAAGCCAaaGCTCAACGACCAATTGCCCCATCCT\\n')\n-\t\tf.write('CTCTCCTACCGAGTACTCCGTACCGCTCATCTCGTCAACCACCACCGCAGACAACAATCG\\n')\n-"..b"CCA\\n')\n-\t\tf.write('AAAATTGGGCGCTTTGAAAAAACGGAACTTCCCTATCTCTTAGGATCGACTAACCCTGGA\\n')\n-\t\tf.write('CCAACTGATGTTCTCCAGGAACCTTTCTCCACTTCAGTCTTCAAAGTTCTCATTTGAATA\\n')\n-\t\tf.write('TTTGCTACTACCACCAAGATCTGCACTAGAGGCTGTTTCACTCCGGTTCACACCAAGAGC\\n')\n-\t\tf.write('TTCTTAACAGTTTATAAAAACCTCCACGCCTGCCTACTCGTTATTGCTTCGCTTTTACAA\\n')\n-\t\tf.write('TAACGGCAGAGTATGGGTAACACGCTTAAGCGCCATCCATTTTCAGGGctAGTTCATTCG\\n')\n-\t\tf.write('GCAGGTGAGTTGTTACACACTCCTTAGCGGATTCCGACTTCCATGGCCACCGTCCTGCTG\\n')\n-\t\tf.write('TCTAGATGAACTAACACCTTTTGTGGTGTCTGATGAGCGTGTATTCCGGCACCTTAACTC\\n')\n-\t\tf.write('TGCGTTCGGTTCATCCCGCATCGCCAGTTCTGCTTACCAAAAaTGGCCCACTAGAAACTC\\n')\n-\t\tf.write('TGCATTCAATGACCTGCTTCAATTAAGCAAACAGGTCGTCTTACATATTTAAAGTTTGAG\\n')\n-\t\tf.write('AGTGGTTGAAGGGCGTTTAGCCCCCCGAGACCCCAATCATTCGCTTTACCACATAAAACT\\n')\n-\t\tf.write('GCGTATAAGTTTCTGCTATCCTGAGGGAAACTTCGGCAGGAACCAGCTACTAGATGGTTC\\n')\n-\t\tf.write('GATTAGtCTTTcGCCCCTATaCCCAAATTTGACGATCGATTTGCACGTCAGAATCGCTAC\\n')\n-\t\tf.write('GAGCCTCCACCAGAGTTTCCTCTGGCTTCACCCTATTCAGGCATAGTTCACCATCTTTCG\\n')\n-\t\tf.write('GGTCCCATCATTAGTGCTTTGTCTCGGTCAATTCAGTATAAAACGTCAGCGCCGGACGAT\\n')\n-\t\tf.write('ACTGCCTCCTTAATGGATTCGTATCAATCAGTTTCCTTACGCATATGGGTTTGGCACCCA\\n')\n-\t\tf.write('AATACTCGCACTAATGGTGGACTCCTTGGTCCGTGTTTCAAGACGGGTCATTTAGAGTCA\\n')\n-\t\tf.write('TTAAGCCAACAACCTAAGCGAATAGAAGTATAACCAAAAAGATCAACCTTGATACCGTAG\\n')\n-\t\tf.write('TACCTCAGAAAACCTTCCTGGAAAACTCGCCAATAAGCATTCGCTGCGTTCCTCAATCCA\\n')\n-\t\tf.write('ACCCAAGGTATTTTCTAAGGGACTATAACACCCACAAGTGGGCCACATTTCCCCTAGTTT\\n')\n-\t\tf.write('TTTCCCTCAAGTCAAATTGTCGTTGGCAGGCATAGCCTGCAAGTGCATCCAGGCCGAAGC\\n')\n-\t\tf.write('CTAGATTGATTACAGACAAGCCAGTCTGGCTCCAAACGGTTCCCTTTTAACAATTTCACA\\n')\n-\t\tf.write('TACTGTTTAACTCTCTTTTCAAAGTTCTTTTCATCTTTCCCTCACGGTACTTGTTCGCTA\\n')\n-\t\tf.write('TCGGTTTCTCGCCAATATTTAGCTTTAGGTGAGATTTACCACCCAATTTAGGCTGCATTC\\n')\n-\t\tf.write('CCAAACAACCTGACTCTTTGAAAGCGTATCACAAAAGGCAAATGCTCAAGCCAAAGACGG\\n')\n-\t\tf.write('GATTCTCACCCTCTATGATGCCCTGTTCCAAAGGACTTATTTACTCGGCTTGCCTGGAAA\\n')\n-\t\tf.write('ACACTTCTACAGTCTACAATCCGGTTTAGCTAGGCCAAACAGGTTCCAACTTTGAGCTCT\\n')\n-\t\tf.write('TTCCTCTTCACTCGCCGTTACTAGGGAAATCATTGTTATTTTCTTTTCCTCCGCTTATTG\\n')\n-\t\tf.write('ATATGCTTAAGTTCAGCGGGTAATCCCACCTGACTTCAGATCATAGTTTGAAAGTTACTG\\n')\n-\t\tf.write('GATTATACTCTTGTACTTTACTTCCTGGGCGAACCAAAAAAAAaGATCCTGAGACCAGCG\\n')\n-\t\tf.write('TAATATTCCTGCCTAGCAAGCCAGACAGAAAATCACACACATTTTAGGTGCTCACTGTAA\\n')\n-\t\tf.write('TAAAACAGCGATGCGACCCATCACCACATAAACAAATGTTATGTGTGGGTTTGTGATGAT\\n')\n-\t\tf.write('ACTGAAGCAGGCGTACTCTATAGAAAAACCAT\\n')\n-\t\tf.write('>Vein_ctg_10639\\n')\n-\t\tf.write('ACAAACAGACAAACAGACAAACAGACAAACAGACAAACAGACAAACAGAGAGGCAGACAA\\n')\n-\t\tf.write('ACAGAGAGGCAGACAAGCAGACAAACTTAACATAATGCTTGCATACAAGTATCCTTGAAG\\n')\n-\t\tf.write('ATCAGAAGCCAAGTGTCAAACTGCTAAAACTGAATTACATAAGTGAATCTAGATAAAGAA\\n')\n-\t\tf.write('TCACATGTGGGGGAAGAACATTAAACTAATACTGTTTACATAAAAAAAAaGCAAAAAAAA\\n')\n-\t\tf.write('ATAATATTTAATTTGTATAGCTGAAAGTGTTCCCGTAAGGAACAAATTCAATGACAAGGG\\n')\n-\t\tf.write('CTTAATCTCAGTACATCGTAGCAACAAAGGCTACTCTAGTACTTACAATACCCCGTCCAT\\n')\n-\t\tf.write('TTCATGTCGTCTGCATGCGATTTATCACTTTGATCATTTGCATTATCATCACAGGGTAGT\\n')\n-\t\tf.write('GAATCACAGCATTTCCGCTGCAAAGCCTATCCCGCAAGTAAGGTTTTCAAGCCGAAGCTT\\n')\n-\t\tf.write('TATTTGTACACAACTAGTACAATCAAAGCACAGTAGTATCGCTTCCAGCATGGATTCTGA\\n')\n-\t\tf.write('CTTAGAGGCGTTCAGCCATTATCCAGCAGATGGTAGCTTCGCGGCATTGGCCTTTCAACC\\n')\n-\t\tf.write('AGCCGCAAATACCAATTATCTGAATGAAGGGTTCCTCTCGTACTAACTTCAATTACTGTT\\n')\n-\t\tf.write('GCGATACCAATACCATCAGTAGGGTAAAACTAACCTGTCTCACGACGGTCTAAACCCAGC\\n')\n-\t\tf.write('TCACGTTCCCTATTAGTGGGTGAACAATCCAACACTTAATGAATTCTGCTTCATTATGAT\\n')\n-\t\tf.write('AGGAAGAGCCGACATCGAAGAATCAAAAAGCAACGTCGCTATGAACGCTTGGCTGCCACA\\n')\n-\t\tf.write('AGCCAGTTATCCCTGTGGTAACTTTTCTGGCACCTCTAGCCTCAAATCTTGAGATTCTAA\\n')\n-\t\tf.write('AGGATCGATAGGCCACACTTTCATGGTTTGTATTCACACTGAAAATCAAAATCAAGGGGA\\n')\n-\t\tf.write('CTTTTACCCTTTTATTCTACAGGAGATTTCTGTTCTCCTTGAGTCCCCCTTAGGACACCT\\n')\n-\t\tf.write('GCGTTATCTTTTAACAGATGTGCCGCCCCAGCCAAACTCCCCACTTGACAATGTCAATAA\\n')\n-\t\tf.write('CATGGGTCGCACCCTAATGGATGCTTAAAGCTAGAAGGTGAGTCTTGCGACTCAATCCCA\\n')\n-\t\tf.write('CTTAATTATTTAAGTAAAAAAaCAATAGA\\n')\n-\t\tf.close() \n"
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/tests/MockESTBankForBlat.py
--- a/commons/launcher/tests/MockESTBankForBlat.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
b'@@ -1,5996 +0,0 @@\n-class MockESTBankForBlat(object):\n-\t\n-\tdef write(self, inFileName):\n-\t\tf = open(inFileName, \'w\')\n-\t\tf.write(">gi|226792376|gb|GO546081.1|GO546081 Mdas9010M17_e784.b1 Apple_EST_Mdas Malus x domestica cDNA 3\' similar to ref|NP_850886.1| expressed protein [Arabidopsis thaliana], mRNA sequence\\n")\n-\t\tf.write("GTTTCACGCTCTTCCTCAGCTTCATCAACCTCCGAACCCTAAATTCCCAAATGGCCTCCTCGCCGGACCA\\n")\n-\t\tf.write("CCACATCAACGGCGACACCAAAACCCACATCTCCAAAAAACCTAAACTTTCCCCAAATTTCATCACTGCC\\n")\n-\t\tf.write("GCCGAAATCGCCGCCGAATTCTCCCACCACGACCCGAACGTCGCCCGGATCAACAACGGCAGCTTCGGCT\\n")\n-\t\tf.write("CCTGCCCCGCCTCCTTGATCGAAGCCCAGCGGCGGTGGCAGCTCAAAAACCTCGCCCAGCCCGACCATTT\\n")\n-\t\tf.write("CTACGTCAACGAGCTCAAGAAGGGAATCCACCGTTCCAGAACCATTATCAAGGAGCTCATCAATGCGGAC\\n")\n-\t\tf.write("CATGTCAACGAGGTCTCACTCGTCGACAACGCCACCACCGCCGCCGCCATCGTGCTTCAGCAGACGGC\\n")\n-\t\tf.write("\\n")\n-\t\tf.write(">gi|226792375|gb|GO546080.1|GO546080 Mdas9010J22_e767.b1 Apple_EST_Mdas Malus x domestica cDNA 3\', mRNA sequence\\n")\n-\t\tf.write("TTTTTTTCCCATTAAAGAATTATAAAAGATCAATACATAGAGAAATAAGAGAGGGACATATATATTGTCA\\n")\n-\t\tf.write("CATATACTGGCTAGATATATATATATCTAGCTAGCTACTTGACAGTTATTTGTACGTAATTACTTGACAA\\n")\n-\t\tf.write("TTAAAAGAAGAAGAAGCAAAGAAAAGTGAACAAGACAAAGATGGAAGTAAGACCATGAGGGTGGAAGTGC\\n")\n-\t\tf.write("ATTCTCAAATGAACCGATTTAGAAAAATAAGGTGGCGGGGGACTGTAAGGATTTACAGGATAAAGGCTTG\\n")\n-\t\tf.write("GTGGTACTATAGAGGGCGCAAATGGA\\n")\n-\t\tf.write("\\n")\n-\t\tf.write(">gi|226792374|gb|GO546079.1|GO546079 Mdas9010L17_e779.b1 Apple_EST_Mdas Malus x domestica cDNA 3\' similar to gb|AAG35782.1|AF280060_1 tonneau 1 [Oryza sativa], mRNA sequence\\n")\n-\t\tf.write("TTTTTTTTTTTTTTCAGTTACTAATTTATATTTCAAGAAATCAATCAAAAAGCACTCCAACAAAGCACTA\\n")\n-\t\tf.write("AATCAAATCAAAATAGGGTATAATCTTACATAACATGCCTATCATTTGCGGGTGAAATACACAAAATCAA\\n")\n-\t\tf.write("ATACCGTGCAGTTATACAAAGGTTGTCATCGTGCAGCTACATCTGGTCAGCCCTGCCGTCATCCTCACTA\\n")\n-\t\tf.write("ATTCCATCTCCTGCGTGCCGCCAAAATGTTGTTAAATTGCGAGCTTTTCTATCCAACTGGAGGTTTTCCA\\n")\n-\t\tf.write("TCGCACTTGAAGCTCGAATGACATCCTCTGGACTTTCATCACTGTCGTATCTATAGCTGTAGTCATCTTT\\n")\n-\t\tf.write("CCTGTAGCCAGACATGGAGGACCCACCTCTTCGATCAAATGACTGGGAAGATGCACCAGGCCTTCCTAGT\\n")\n-\t\tf.write("GGAGGTAGCCCACCAGCAACAGATGATGAAGAAGGTCTTCTCATATTGCGAGAATCTAAATTGGACAGGG\\n")\n-\t\tf.write("ATTCTGTTTCTGAAGTCGTTAGCCTCCTTCCGGTACCCCTTGATTGAGATAGATTCTCAAATTTCAAAAA\\n")\n-\t\tf.write("TCCTTCAAGCACATCCAAAAGCAAAGGACCACTATCTCCATTTCGGTTAAGATCATATCCATTCTTGCTA\\n")\n-\t\tf.write("CTAAAGTCCTTCAACTCAGCTTTCCAAGAATCCTTTT\\n")\n-\t\tf.write("\\n")\n-\t\tf.write(">gi|226792373|gb|GO546078.1|GO546078 Mdas9010H22_e754.b1 Apple_EST_Mdas Malus x domestica cDNA 3\' similar to gb|AAC34983.1| light harvesting chlorophyll A/B binding protein [Prunus persica], mRNA sequence\\n")\n-\t\tf.write("AAAAAAAGCAGCAAGCAATGGCAACCTCTGCAATCCAACAATCAGCATTTGCTGGCCAGACTGCTTTGAA\\n")\n-\t\tf.write("GCAGTCCAATGAGCTCGTCCGAAAGATCGGCGGCCTTGGCGGCGGCCGCTTCTCCATGCGGCGCACCGTC\\n")\n-\t\tf.write("AAAAGTGCCCCCCAGAGCATATGGTACGGCCCAGACCGCCCCAAGTACTTGGGACCATTCTCCGAGCAAA\\n")\n-\t\tf.write("CTCCGTCATACTTGACCGGTGAATTCCCCGGAGACTACGGATGGGACACTGCTGGACTATCTGCAGACCC\\n")\n-\t\tf.write("CGAGACATTTGCCAAGAACCGTGAGCTTGAGGTGATCCACTCCAGATGGGCCATGCTTGGTGCACTGGGA\\n")\n-\t\tf.write("TGCGTCTTCACAGAAATCTTGTCAAGGAATGGCGTCAAGTTCGGCGAGGCTGTCTGGTTCAAGGCTGGAT\\n")\n-\t\tf.write("CGCAAATCTTCTCTGAGGGCGGCCTTGACTACCTTGGGCACCCAAACCTTATCCATGCTCAGAGCATCTT\\n")\n-\t\tf.write("GGCAATCTGGGCTGTCCAGGTCGTGCTCATGGGATTCATTGAGGGATACAGAGTTGGAGGAGGAACCACT\\n")\n-\t\tf.write("CGGTGAAGGACTAGACCCACTTTACCCAGGAGGGGCCTTTGACCCCCTTGGACTTGCTGATGATCCCGAA\\n")\n-\t\tf.write("GCTTTTGCTGAACTGAAGGT\\n")\n-\t\tf.write("\\n")\n-\t\tf.write(">gi|226792372|gb|GO546077.1|GO546077 Mdas9010K23_e774.b1 Apple_EST_Mdas Malus x domestica cDNA 3\' similar to ref|NP_187130.1| ribose 5-phosphate isomerase -related [Arabidopsis thaliana] gb|AAF04905.1|AC011437_20 putative ribose 5-phosphate isomerase [Arabidopsis thaliana] gb|AAG51427.1|AC009465_27 putative ribose 5-phosphate isomerase; 91580-90750 [Arabi, mRNA sequence\\n")\n-\t\tf.write("TTTTTTTGAAGCACGAAGGTAATTCATTTCACATTATTTCACAATTCACAATTCCATCATTCTTTAGTAT\\n")\n-\t\tf.write("CATTAGTATACCACTGAGTC'..b'AACCTCTTCTCCAAGATGGACG\\n")\n-\t\tf.write("TCTACGCCGCCGTTTCGGTCGCCGGCGACCCGCGCAACAAGAAGCAGAAGAACAAAACCCCCGTCGTCAA\\n")\n-\t\tf.write("GGACGGAGGCACCAACCCCAAGTGGACCAGCTACCCCATCAGGTTCACCGTCGACGAAGCCGCCCTCCTC\\n")\n-\t\tf.write("AACAACCGCCTCACCCTCAACATCAAGCTCGTCTCCGAACGCACTTTGGGAGACACCAAGATCGGCAAGG\\n")\n-\t\tf.write("TCAAGATCCCGCTCAAGGACCTACTAGACACCATGAGCGGCGGCGATGATCACA\\n")\n-\t\tf.write("\\n")\n-\t\tf.write(">gi|226789543|gb|GO546082.1|GO546082 Mdas9010H14_e752.b1 Apple_EST_Mdas Malus x domestica cDNA 3\' similar to pir|G86463 hypothetical protein F12G12.18 - Arabidopsis thaliana gb|AAG12539.1|AC015446_20 Unknown protein [Arabidopsis thaliana] gb|AAG12849.1|AC079286_6 photosystem II 22 kDa protein, putative; 13290-12539 [Arabidopsis thaliana] gb|AAK55677.1|A, mRNA sequence\\n")\n-\t\tf.write("TTTTTTTATCAACGAGCTCTGGGGAACTTCTTCAATCGTTGAAATCCTGNTAAACATTGTAAGTAAAATA\\n")\n-\t\tf.write("CAGCAGCGTATGATAGCCGAGTATTTCTTGCAAATGAAATTTAAACAAATTACTCAACAAAGTTACAAGT\\n")\n-\t\tf.write("GAAACAGTGAATGTATCTGCAGTAGCTCCAGAGACAAGAAGGTATTAAGGCTTTCAACATCCCACCGGGC\\n")\n-\t\tf.write("CGGTGTATCATTCCAGATCCAGTATTCCGAAATTTGAAAGAAGTATCTTTACTTGATCAACAAAGTCCGA\\n")\n-\t\tf.write("GCCAGTTGCATACTCCGTTAGCATTCCAACAGCAAAACCGAACATTGCCCATCTGCCATTGCTAATCTCG\\n")\n-\t\tf.write("TTCTTGCCAACAAAGCCAAAGAAAGGACCCTGGTTAGCAGCCTCAAGCTTCTTCTGCTTGAAGTACTCCT\\n")\n-\t\tf.write("GAATCTCCTTAGCCTTCTGCCTCTGAAACTCCAAGGTCACCACATTCTTGTCCTCCACCATCGTCAGCCC\\n")\n-\t\tf.write("GGAAACCTGGGCCGGATTCGAGGGCTGCTGAGGCGGTGGAGAAGGAGACGGAGGAGAAGGAGGCGTTGGT\\n")\n-\t\tf.write("TTGAGAGGGGAAGACGGCTGGGAGGGTTCTCGGAGGGAAGGAGCAGCAGGTCTTCTGATAGGCCCTTCCG\\n")\n-\t\tf.write("TCTTGGGAGCTCTTTATGCTAATTTTTA\\n")\n-\t\tf.write("\\n")\n-\t\tf.write(">gi|226789542|gb|GO545826.1|GO545826 Mdas9003M24_e233.b1 Apple_EST_Mdas Malus x domestica cDNA 3\' similar to sp|Q9M4S8|TPIC_FRAAN Triosephosphate isomerase, chloroplast precursor (TIM) gb|AAF66071.1|AF257322_1 triosephosphate isomerase [Fragaria x ananassa], mRNA sequence\\n")\n-\t\tf.write("TCGAGTTTTTTTTTTTTTTTTTTAAGTGACCCATGGAAAATGGATAGAAGATATATTTTACTATCTTTAT\\n")\n-\t\tf.write("GGAGGGGGAAACACTTCAAAAACGACCCAGGAAAAAAAATTCCTTATGATAAACTGGCTCATACATTTGT\\n")\n-\t\tf.write("TACAATATGCTTCAATCTCAAGGTACCTTCGCATCGGCCCTTTATTTGATCTCGGAACCACCATAATCAA\\n")\n-\t\tf.write("GCAGCAACTTTCTTGGCTGTCACAGCGTTGACGATAGTAGCAAATTCAGGGCCCTTTAGGGAAGCACCGC\\n")\n-\t\tf.write("CAACAAGAAAACCATCAATATCTTCCTTCTTTGCGAGCTCAACAGAATTGCCTCCATTTACAGATCCTCC\\n")\n-\t\tf.write("ATAAATAATTCTTGTTTTAGATGCAACTTCTGCTGACACATTCTGTTTCAGCCAATCACGAACAGCTACA\\n")\n-\t\tf.write("TGTACTTCCTGAGCTTGTTCTGGACTGGCTACCTTACCAGTCCCAATGGCCCATACAGGCTCATAAGCAA\\n")\n-\t\tf.write("CAACTATCTTATCCCAGCTGGGTACTGCGTCTGCAAAAGCCTTCAGCTGCTGAAAGCAGACGTCAAAAGT\\n")\n-\t\tf.write("TTTCCCTGCTTCCCTTTCTTCTAGCTTCTCGCCCAATGCAAGCAATTACTCCGAGACCCTCATTCAACGC\\n")\n-\t\tf.write("ATAGG\\n")\n-\t\tf.write("\\n")\n-\t\tf.write(">gi|226789541|gb|GO545825.1|GO545825 Mdas9003P18_e247.b1 Apple_EST_Mdas Malus x domestica cDNA 3\' similar to ref|NP_189513.1| expressed protein [Arabidopsis thaliana] sp|Q9LHA4|V0D2_ARATH Probable vacuolar ATP synthase subunit d 2 (V-ATPase d subunit 2) (Vacuolar proton pump d subunit 2) gb|AAL16278.1|AF428348_1 AT3g28715/MZN14_21 [Arabidopsis thaliana], mRNA sequence\\n")\n-\t\tf.write("TTTTTTATAAACTCACTACGAGACTGCTACTATAGTAGCTCTCAAATTGCAATATATATATTCAATTTAT\\n")\n-\t\tf.write("CCTCACAACTGTAACATGCTCGATTTCAGAACATGACATATTCCCTCTATGTAAAAACGACCGGAATAAT\\n")\n-\t\tf.write("ATATGCAAAAGTGCTTATTAGGAAGGAACACCGGATAGTGCAAACAACGCAACCGCACCCATCTCTACAA\\n")\n-\t\tf.write("TTCGTTCGGGGATATGATGGGGAGGAGATTTACAGAAGATTATGCGAAAGAACGAAGGATCATCTGTAAT\\n")\n-\t\tf.write("GGTGTGTTCTGAGTCCCAATCCGACTAAAATATGAAGACCACGCTGTCGTGAACTCTGGACTTCTGGTTC\\n")\n-\t\tf.write("TGAGCCACACACTCAGATATCCACATCAAATTTCTGATCTCCTGCTCCCTCAACCTCATGTATGCAAAGA\\n")\n-\t\tf.write("AAACAGCGTAATGGAACTGTTGCTCAAATGCTAAGCAAAGCCTTTTCACCTCCTCTTCATAAAATGCCTT\\n")\n-\t\tf.write("GTCAAGCATCTGGGTTTCGCCATAGGATAGTTTTGAAAAAATAGACTGATAAGGAGGATATTTTTCCATG\\n")\n-\t\tf.write("CAACCACGTACCTGATCAATGTCCTCACATACAGCAAGTTCCTCATGGCCATAGGGAATAGAGTAAACCA\\n")\n-\t\tf.write("AAGCTAGAGTACAACTTCCTGCGATCATCTCGAGTAAGCTCAGTTCAATACTATTTATGGGT\\n")\n-\t\tf.write("\\n")\n-\t\tf.close() \n'
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/tests/MockOutputForBlat.py
--- a/commons/launcher/tests/MockOutputForBlat.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,33 +0,0 @@
-class MockOutputForBlat(object):
-
- def write(self, inFileName):
- f = open(inFileName, 'w')
- f.write('gi|226792305|gb|GO545799.1|GO545799 290 551 Vein_ctg_10639 674 935 1.0e-130 463.0 93.51\n')
- f.write('gi|226792305|gb|GO545799.1|GO545799 138 283 Vein_ctg_10639 519 664 1.0e-50 198.0 82.88\n')
- f.write('gi|226792305|gb|GO545799.1|GO545799 577 686 Vein_ctg_10639 961 1070 1.4e-46 184.0 90.91\n')
- f.write('gi|226792305|gb|GO545799.1|GO545799 566 572 Vein_ctg_10639 944 950 3.1e+05 13.0 100.00\n')
- f.write('gi|226792293|gb|GO546055.1|GO546055 107 193 Vein_ctg_10638 87 1 2.2e-42 170.0 100.00\n')
- f.write('gi|226792293|gb|GO546055.1|GO546055 34 91 Vein_ctg_10638 161 104 2.5e-22 103.0 94.83\n')
- f.write('gi|226792293|gb|GO546055.1|GO546055 521 611 Vein_ctg_10639 1075 985 2.9e-38 156.0 92.31\n')
- f.write('gi|226790810|gb|GO546215.1|GO546215 57 520 Vein_ctg_5197 1862 1399 8.7e-128 454.0 72.84\n')
- f.write('gi|226790791|gb|GO546209.1|GO546209 135 199 Vein_ctg_5197 1994 1930 7.4e-25 112.0 93.85\n')
- f.write('gi|226790791|gb|GO546209.1|GO546209 36 82 Vein_ctg_5197 2126 2080 1.9e-06 50.0 76.60\n')
- f.write('gi|226790483|gb|GO545656.1|GO545656 280 541 Vein_ctg_10639 674 935 1.0e-130 463.0 93.51\n')
- f.write('gi|226790483|gb|GO545656.1|GO545656 128 273 Vein_ctg_10639 519 664 1.0e-50 198.0 82.88\n')
- f.write('gi|226790483|gb|GO545656.1|GO545656 567 640 Vein_ctg_10639 961 1034 1.1e-25 114.0 87.84\n')
- f.write('gi|226790483|gb|GO545656.1|GO545656 556 562 Vein_ctg_10639 944 950 3.1e+05 13.0 100.00\n')
- f.write('gi|226790458|gb|GO545644.1|GO545644 1 95 Vein_ctg_10638 1369 1275 3.5e-40 163.0 92.63\n')
- f.write('gi|226790458|gb|GO545644.1|GO545644 146 185 Vein_ctg_10638 1225 1186 3.7e-07 53.0 82.50\n')
- f.write('gi|226790049|gb|GO546186.1|GO546186 177 263 Vein_ctg_10638 87 1 5.6e-39 159.0 96.55\n')
- f.write('gi|226790049|gb|GO546186.1|GO546186 106 161 Vein_ctg_10638 159 104 3.8e-21 99.0 94.64\n')
- f.write('gi|226790011|gb|GO546174.1|GO546174 138 283 Vein_ctg_10639 519 664 1.0e-50 198.0 82.88\n')
- f.write('gi|226789634|gb|GO545875.1|GO545875 135 306 Vein_ctg_10638 1446 1275 7.3e-80 294.0 91.86\n')
- f.write('gi|226789634|gb|GO545875.1|GO545875 451 496 Vein_ctg_10638 1132 1087 1.8e-18 90.0 100.00\n')
- f.write('gi|226789634|gb|GO545875.1|GO545875 357 393 Vein_ctg_10638 1225 1189 1.8e-05 47.0 81.08\n')
- f.write('gi|226789597|gb|GO546106.1|GO546106 432 537 Vein_ctg_2286 1166 1061 5.0e-40 162.0 86.79\n')
- f.write('gi|226789597|gb|GO546106.1|GO546106 538 632 Vein_ctg_2286 1008 914 6.0e-33 139.0 85.26\n')
- f.write('gi|226789571|gb|GO546096.1|GO546096 353 474 Vein_ctg_5197 2426 2305 4.1e-46 182.0 84.43\n')
- f.write('gi|226789566|gb|GO545840.1|GO545840 73 232 Vein_ctg_10639 776 935 2.5e-75 279.0 92.50\n')
- f.write('gi|226789566|gb|GO545840.1|GO545840 258 372 Vein_ctg_10639 961 1075 4.2e-50 196.0 92.17\n')
- f.write('gi|226789566|gb|GO545840.1|GO545840 247 253 Vein_ctg_10639 944 950 3.1e+05 13.0 100.00\n')
- f.close() 
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/tests/Test_BlatClusterLauncher.py
--- a/commons/launcher/tests/Test_BlatClusterLauncher.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,34 +0,0 @@
-import unittest
-from commons.launcher.BlatClusterLauncher import BlatClusterLauncher
-
-
-class Test_BlatClusterLauncher( unittest.TestCase ):
-    
-    def setUp( self ):
-        self._i = BlatClusterLauncher()
-        
-        
-    def tearDown( self ):
-        self._i = None
-        
-        
-    def test_getSpecificHelpAsString( self ):
-        exp = ""
-        exp += "\nspecific options:"
-        exp += "\n     -s: name of the subject file (format='fasta')"
-        exp += "\n     -p: parameters for 'blat'"
-        exp += "\n     -Z: concatenate output files"
-        exp += "\n     -A: same sequences (all-by-all)"
-        obs = self._i.getSpecificHelpAsString()
-        self.assertEqual( exp, obs )
-        
-        
-    def test_setASpecificAttributeFromCmdLine( self ):
-        self._i.setASpecificAttributeFromCmdLine( "-s", "dummySubjectFile.fa" )
-        self.assertEqual( "dummySubjectFile.fa", self._i.getSubjectFile() )
-        
-        
-test_suite = unittest.TestSuite()
-test_suite.addTest( unittest.makeSuite( Test_BlatClusterLauncher ) )
-if __name__ == "__main__":
-    unittest.TextTestRunner(verbosity=2).run( test_suite )
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/tests/Test_BlatProgramLauncher.py
--- a/commons/launcher/tests/Test_BlatProgramLauncher.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,98 +0,0 @@
-import unittest
-from commons.launcher.BlatProgramLauncher import BlatProgramLauncher
-
-
-class Test_BlatProgramLauncher( unittest.TestCase ):
-    
-    def setUp( self ):
-        self._i = BlatProgramLauncher()
-        
-        
-    def tearDown( self ):
-        self._i = None
-        
-        
-    def test_getHelpAsString( self ):
-        exp = ""
-        exp += "usage: BlatProgramLauncher.py [options]" 
-        exp += "\ngeneric options:"
-        exp += "\n     -h: this help"
-        exp += "\n     -i: name of the input file (format='fasta')"
-        exp += "\n     -c: clean"
-        exp += "\n     -v: verbosity level (default=0/1)"
-        exp += "\nspecific options:"
-        exp += "\n     -s: name of the subject file (database, format='fasta')"
-        exp += "\n     -p: parameters for 'blat'"
-        exp += "\n     -A: same sequences (all-by-all)"
-        exp += "\n     -o: name of the output file (format='align', default=inFile+'.align')"
-        obs = self._i.getHelpAsString()
-        self.assertEqual( exp, obs )
-        
-        
-    def test_setAttributesFromCmdLine( self ):
-        self._i.setAttributesFromCmdLine( "-s", "dummySubjectFile.fa" )
-        self.assertEqual( "dummySubjectFile.fa", self._i.getSubjectFile() )
-        
-        self._i.setAttributesFromCmdLine( "-o", "dummyOutFile.align" )
-        self.assertEqual( "dummyOutFile.align", self._i.getOutputFile() )
-        
-        
-    def test_setWrapperCommandLine( self ):
-        self._i.setInputFile( "dummyInFile.fa" )
-        self._i.setSubjectFile( "dummySubjectFile.fa" )
-        exp = "BlatProgramLauncher.py"
-        exp += " -i %s" % ( "dummyInFile.fa" )
-        exp += " -s %s" % ( "dummySubjectFile.fa" )
-        exp += " -o %s.align" % ( "dummyInFile.fa" )
-        exp += " -v 0"
-        self._i.setWrapperCommandLine()
-        obs = self._i.getWrapperCommandLine()
-        self.assertEqual( exp, obs )
-        
-        
-    def test_setProgramCommandLine( self ):
-        self._i.setInputFile( "dummyInFile.fa" )
-        self._i.setSubjectFile( "dummySubjectFile.fa" )
-        self._i.setProgramParameters( "-minIdentity=90" )
-        exp = "blat dummySubjectFile.fa dummyInFile.fa -minIdentity=90 -out=blast8 dummyInFile.fa.blast"
-        self._i.setProgramCommandLine()
-        obs = self._i.getProgramCommandLine()
-        self.assertEqual( exp, obs )
-        
-        
-    def test_setListFilesToKeep( self ):
-        self._i.setInputFile( "dummyInFile.fa" )
-        lExp = [ "dummyInFile.fa.align" ]
-        self._i.setListFilesToKeep()
-        lObs = self._i.getListFilesToKeep()
-        lExp.sort()
-        lObs.sort()
-        self.assertEqual( lExp, lObs )
-        
-        
-    def test_setListFilesToRemove( self ):
-        self._i.setInputFile( "dummyInFile.fa" )
-        lExp = [ "dummyInFile.fa.blast" ]
-        self._i.setListFilesToRemove()
-        lObs = self._i.getListFilesToRemove()
-        lExp.sort()
-        lObs.sort()
-        self.assertEqual( lExp, lObs )
-        
-        
-    def test_setSummary( self ):
-        self._i.setInputFile( "dummyInFile.fa" )
-        self._i.setSubjectFile( "dummySubjectFile.fa" )
-        exp = "input file: %s" % ( self._i.getInputFile() )
-        exp += "\nsubject file: %s" % ( self._i.getSubjectFile() )
-        exp += "\nparameters: %s" % ( self._i.getProgramParameters() )
-        exp += "\noutput file: %s" % ( "dummyInFile.fa.align" )
-        self._i.setSummary()
-        obs = self._i.getSummary()
-        self.assertEqual( exp, obs )
-        
-        
-test_suite = unittest.TestSuite()
-test_suite.addTest( unittest.makeSuite( Test_BlatProgramLauncher ) )
-if __name__ == "__main__":
-    unittest.TextTestRunner(verbosity=2).run( test_suite )
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/tests/Test_F_BlatProgramLauncher.py
--- a/commons/launcher/tests/Test_F_BlatProgramLauncher.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,139 +0,0 @@
-import os
-import unittest
-from commons.core.utils.FileUtils import FileUtils
-from devTools.tests.MockFastaSupctg30 import MockFastaSupctg30
-from devTools.tests.MockMiniProtBankSupctg30 import MockMiniProtBankSupctg30
-from commons.launcher.tests.MockDataBankForBlat import MockDataBankForBlat
-from commons.launcher.tests.MockESTBankForBlat import MockESTBankForBlat
-from commons.launcher.tests.MockOutputForBlat import MockOutputForBlat
-from commons.launcher.BlatProgramLauncher import BlatProgramLauncher
-
-class Test_F_BlatProgramLauncher(unittest.TestCase):
-
-    def test_run_empty_result(self):
-        queryFileName = "smallProtBank_supctg30.fa"
-        mock = MockMiniProtBankSupctg30()
-        mock.write(queryFileName)
-        subjectFileName = "subjectBank.fa"
-        mock = MockFastaSupctg30()
-        mock.write(subjectFileName)
-        
-        expOutputFileName = "expBlatOutput.blast.align"
-        self.writeEmptyExpOutputFile(expOutputFileName)
-        
-        obsOutputFileName = "obsBlatOutput.blast.align"
-
-        bpl = BlatProgramLauncher()
-        bpl.setInputFile(queryFileName)
-        bpl.setSubjectFile(subjectFileName)
-        bpl.setOutputFile(obsOutputFileName)
-        bpl.setProgramParameters("")
-        bpl.run()
-        
-        blastFileName = queryFileName + ".blast"
-        
-        self.assertTrue(os.path.exists(obsOutputFileName))
-        self.assertTrue(FileUtils.are2FilesIdentical(expOutputFileName, obsOutputFileName))
-        
-        os.remove(queryFileName)
-        os.remove(subjectFileName)
-        os.remove(blastFileName)
-        os.remove(expOutputFileName)
-        os.remove(obsOutputFileName)
-
-    def test_as_script_empty_result(self):
-        queryFileName = "smallProtBank_supctg30.fa"
-        mock = MockMiniProtBankSupctg30()
-        mock.write(queryFileName)
-        subjectFileName = "subjectBank.fa"
-        mock = MockFastaSupctg30()
-        mock.write(subjectFileName)
-        
-        expOutputFileName = "expBlatOutput.blast.align"
-        self.writeEmptyExpOutputFile(expOutputFileName)
-        
-        obsOutputFileName = "obsBlatOutput.blast.align"
-        
-        cmd2Launch = "python ../BlatProgramLauncher.py -s " + subjectFileName + " -i " + queryFileName + " -p '' -o " + obsOutputFileName
-        
-        os.system(cmd2Launch)
-        
-        blastFileName = queryFileName + ".blast"
-                
-        self.assertTrue(os.path.exists(obsOutputFileName))
-        self.assertTrue(FileUtils.are2FilesIdentical(expOutputFileName, obsOutputFileName))
-        
-        os.remove(queryFileName)
-        os.remove(subjectFileName)
-        os.remove(blastFileName)
-        os.remove(expOutputFileName)
-        os.remove(obsOutputFileName)
-
-    def test_run(self):
-        queryFileName = "smallESTBank.fa"
-        mock = MockESTBankForBlat()
-        mock.write(queryFileName)
-        subjectFileName = "subjectBank.fa"
-        mock = MockDataBankForBlat()
-        mock.write(subjectFileName)
-        
-        expOutputFileName = "expBlatOutput.blast.align"
-        mock = MockOutputForBlat()
-        mock.write(expOutputFileName)
-        
-        obsOutputFileName = "obsBlatOutput.blast.align"
-
-        bpl = BlatProgramLauncher()
-        bpl.setInputFile(queryFileName)
-        bpl.setSubjectFile(subjectFileName)
-        bpl.setOutputFile(obsOutputFileName)
-        bpl.setProgramParameters("")
-        bpl.run()
-        
-        blastFileName = queryFileName + ".blast"
-        
-        self.assertTrue(os.path.exists(obsOutputFileName))
-        self.assertTrue(FileUtils.are2FilesIdentical(expOutputFileName, obsOutputFileName))
-        
-        os.remove(queryFileName)
-        os.remove(subjectFileName)
-        os.remove(blastFileName)
-        os.remove(expOutputFileName)
-        os.remove(obsOutputFileName)
-
-    def test_as_script(self):
-        queryFileName = "smallESTBank.fa"
-        mock = MockESTBankForBlat()
-        mock.write(queryFileName)
-        subjectFileName = "subjectBank.fa"
-        mock = MockDataBankForBlat()
-        mock.write(subjectFileName)
-        
-        expOutputFileName = "expBlatOutput.blast.align"
-        mock = MockOutputForBlat()
-        mock.write(expOutputFileName)
-        
-        obsOutputFileName = "obsBlatOutput.blast.align"
-        
-        cmd2Launch = "python ../BlatProgramLauncher.py -s " + subjectFileName + " -i " + queryFileName + " -p '' -o " + obsOutputFileName
-        
-        os.system(cmd2Launch)
-        
-        blastFileName = queryFileName + ".blast"
-                
-        self.assertTrue(os.path.exists(obsOutputFileName))
-        self.assertTrue(FileUtils.are2FilesIdentical(expOutputFileName, obsOutputFileName))
-        
-        os.remove(queryFileName)
-        os.remove(subjectFileName)
-        os.remove(blastFileName)
-        os.remove(expOutputFileName)
-        os.remove(obsOutputFileName)
-        
-    def writeEmptyExpOutputFile(self, outputFileName):
-        f = open(outputFileName, "w")
-        f.write("")
-        f.close()
-        
-if __name__ == "__main__":
-    unittest.main()
\ No newline at end of file
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/tests/Test_F_LaunchBlastclust.py
--- a/commons/launcher/tests/Test_F_LaunchBlastclust.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,103 +0,0 @@
-import unittest
-import os
-from commons.launcher.LaunchBlastclust import LaunchBlastclust
-from commons.core.utils.FileUtils import FileUtils
-
-class Test_F_LaunchBlastclust(unittest.TestCase):
-
-    def setUp(self):
-        self._inputFileName = "DmelChr4_LTRharvest_expected_with_default_params.fa"
-        os.symlink("%s/Tools/%s" % (os.environ["REPET_DATA"], self._inputFileName), self._inputFileName)
-        self._outputFileName = "%s_Blastclust.fa" % self._inputFileName
-        self._outBlastclustFileName = "%s_blastclust.txt" % self._inputFileName
-        
-    def tearDown(self):
-        if os.path.exists(self._outputFileName):
-            os.remove(self._outputFileName)
-        if os.path.exists(self._outBlastclustFileName):
-            os.remove(self._outBlastclustFileName)
-        os.remove(self._inputFileName)
-
-    def test_run(self):
-        iLaunchBlastclust = LaunchBlastclust(self._inputFileName, clean = True)
-        iLaunchBlastclust.run()
-        expFileName = "%s/Tools/DmelChr4_LTRharvest_Blastclust_expected.fa" % os.environ["REPET_DATA"]
-        self.assertTrue(FileUtils.are2FilesIdentical(expFileName, self._outputFileName))
-        
-    def test_run_with_tweaked_params(self):
-        iLaunchBlastclust = LaunchBlastclust(self._inputFileName, clean = True)
-        iLaunchBlastclust.setBothSequences("F")
-        iLaunchBlastclust.setIdentityThreshold(0)
-        iLaunchBlastclust.setIsBlastToMap()
-        iLaunchBlastclust.run()
-        
-        faExpFileName = "%s/Tools/DmelChr4_LTRharvest_Blastclust_expected_with_tweaked_params.fa" % os.environ["REPET_DATA"]
-        mapExpFileName = "%s/Tools/DmelChr4_LTRharvest_Blastclust_expected_with_tweaked_params.map" % os.environ["REPET_DATA"]
-        
-        self.assertTrue(FileUtils.are2FilesIdentical(faExpFileName, self._outputFileName))
-        self.assertTrue(FileUtils.are2FilesIdentical(mapExpFileName, "%s.map" % os.path.splitext(self._outputFileName)[0]))
-        
-        os.remove("%s.map" % os.path.splitext(self._outputFileName)[0])
-      
-    def test_run_with_header_options(self):
-        inFileName = "dummyHeaderForTEdenovo.fa"
-        expFileName = "expDummyHeaderForTEdenovo.fa"
-        self._writeInputFile_header_options(inFileName)
-        self._writeExpFile_header_options(expFileName)
-        obsFileName = "%s_Blastclust.fa" % inFileName
-        
-        iLaunchBlastclust = LaunchBlastclust(inFileName, clean = True)
-        iLaunchBlastclust.setIsHeaderForTEdenovo(True)
-        iLaunchBlastclust.run()
-        
-        self.assertTrue(FileUtils.are2FilesIdentical(expFileName, obsFileName))
-        
-        os.remove(inFileName)
-        os.remove(expFileName)
-        os.remove(obsFileName)
-        os.remove("%s_blastclust.txt" % inFileName)
-          
-    def test_run_as_script(self):
-        cmd = "LaunchBlastclust.py -i %s" % self._inputFileName
-        os.system(cmd)
-        expFileName = "%s/Tools/DmelChr4_LTRharvest_Blastclust_expected.fa" % os.environ["REPET_DATA"]
-        self.assertTrue(FileUtils.are2FilesIdentical(expFileName, self._outputFileName))
-        
-    def _writeInputFile_header_options(self, inFileName):
-        f = open(inFileName,"w")
-        f.write(">DTX-incomp_DmelChr4-B-R9-Map3_reversed\n")
-        f.write("CATTAGATTCAAGGCATCATGGATCAGCACATTTACACAGATATCCTGGAAAATGTGATG\n")
-        f.write("CTGCCATATGCCGGGGATGAAATGCCGTTGGTTTGGACATTTCAACAGGATAACGATTCA\n")
-        f.write("AAACACACGAGCAAGAAAGCTTGAAAGTGGTTTGAGCAGAAATCGATCCGAGTAATGAAA\n")
-        f.write("TGGCCTGCTCTGTCATCCGACTTGAATCCAATCGAAAACCTTTGGGCGGACGTGGAAAAA\n")
-        f.write(">DTX-incomp_DmelChr4-B-R10-Map3_reversed\n")
-        f.write("CATTAGATTCAAGGCATCATGGATCAGCACATTTACACAGATATCCTGGAAAATGTGATG\n")
-        f.write("CTGCCATATGCCGGGGATGAAATGCCGTTGGTTTGGACATTTCAACAGGATAACGATTCA\n")
-        f.write("AAACACACGAGCAAGAAAGCTTGAAAGTGGTTTGAGCAGAAATCGATCCGAGTAATGAAA\n")
-        f.write("TGGCCTGCTCTGTCATCCGACTTGAATCCAATCGAAAACCTTTGGGCGGACGTGGAAAAA\n")
-        f.write(">PotentialHostGene-chim_DmelChr4-B-R4-Map5_reversed\n")
-        f.write("TACCAAAGACACTAGAATAACAAGATGCGTAACGCCATACGATTTTTTGGCACACGATTT\n")
-        f.write("TTTCGCCGTGGCTCTAGAGGTGGCTCCAGGCTCTCTCGAATTTTTGTTAGAGAGCGAGAG\n")
-        f.write("AGCGGAGAGCGCTACAGCGAACAGCTCTTTTCAACGCATAAAGTGATAGCAGACAACTGT\n")
-        f.close()
-        
-    def _writeExpFile_header_options(self, expFileName):
-        f = open(expFileName,"w")
-        f.write(">DTX-incomp_Blc1_DmelChr4-B-R9-Map3_reversed\n")
-        f.write("CATTAGATTCAAGGCATCATGGATCAGCACATTTACACAGATATCCTGGAAAATGTGATG\n")
-        f.write("CTGCCATATGCCGGGGATGAAATGCCGTTGGTTTGGACATTTCAACAGGATAACGATTCA\n")
-        f.write("AAACACACGAGCAAGAAAGCTTGAAAGTGGTTTGAGCAGAAATCGATCCGAGTAATGAAA\n")
-        f.write("TGGCCTGCTCTGTCATCCGACTTGAATCCAATCGAAAACCTTTGGGCGGACGTGGAAAAA\n")
-        f.write(">DTX-incomp_Blc1_DmelChr4-B-R10-Map3_reversed\n")
-        f.write("CATTAGATTCAAGGCATCATGGATCAGCACATTTACACAGATATCCTGGAAAATGTGATG\n")
-        f.write("CTGCCATATGCCGGGGATGAAATGCCGTTGGTTTGGACATTTCAACAGGATAACGATTCA\n")
-        f.write("AAACACACGAGCAAGAAAGCTTGAAAGTGGTTTGAGCAGAAATCGATCCGAGTAATGAAA\n")
-        f.write("TGGCCTGCTCTGTCATCCGACTTGAATCCAATCGAAAACCTTTGGGCGGACGTGGAAAAA\n")
-        f.write(">PotentialHostGene-chim_Blc2_DmelChr4-B-R4-Map5_reversed\n")
-        f.write("TACCAAAGACACTAGAATAACAAGATGCGTAACGCCATACGATTTTTTGGCACACGATTT\n")
-        f.write("TTTCGCCGTGGCTCTAGAGGTGGCTCCAGGCTCTCTCGAATTTTTGTTAGAGAGCGAGAG\n")
-        f.write("AGCGGAGAGCGCTACAGCGAACAGCTCTTTTCAACGCATAAAGTGATAGCAGACAACTGT\n")
-        f.close()
-        
-if __name__ == "__main__":
-    unittest.main()
\ No newline at end of file
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/tests/Test_F_LaunchLastZ.py
--- a/commons/launcher/tests/Test_F_LaunchLastZ.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,31 +0,0 @@
-import unittest
-import os
-from commons.core.utils.FileUtils import FileUtils
-from commons.launcher.LaunchLastZ import LaunchLastZ
-
-class Test_F_LaunchLastZ(unittest.TestCase):
-    
-    def setUp(self):
-        self._inFastaFileName = "%s/Tools/input_TestFLastZ.fa" % os.environ["REPET_DATA"]
-        self._expAxtFileName  = "%s/Tools/exp_TestFLastZ.axt" % os.environ["REPET_DATA"] 
-        self._obsAxtFileName = "obsLastZ.axt"
-        
-    def tearDown(self):
-        try:
-            os.remove(self._obsAxtFileName)
-        except:pass
-        
-    def test_run(self):
-        ilauncher = LaunchLastZ(self._inFastaFileName, self._inFastaFileName, self._obsAxtFileName,verbosity=1)
-        ilauncher.run()
-        self.assertTrue(FileUtils.are2FilesIdentical(self._expAxtFileName, self._obsAxtFileName))
-        
-    def test_run_as_script(self):
-        #FIXME : change path 
-        cmd = 'python %s/commons/launcher/LaunchLastZ.py -q %s -r %s -o %s' % (os.environ["REPET_PATH"], self._inFastaFileName, self._inFastaFileName, self._obsAxtFileName)
-        os.system(cmd)
-        self.assertTrue(FileUtils.are2FilesIdentical(self._expAxtFileName, self._obsAxtFileName))

-                       
-if __name__ == "__main__":
-    unittest.main()
\ No newline at end of file
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/tests/Test_F_LaunchMCL.py
--- a/commons/launcher/tests/Test_F_LaunchMCL.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,87 +0,0 @@
-from commons.core.utils.FileUtils import FileUtils
-import unittest
-import os
-import shutil
-from commons.launcher.LaunchMCL import LaunchMCL
-
-class Test_F_LaunchMCL(unittest.TestCase):
-# TODO: test query coverage filter
-
-    def setUp(self):
-        self._inputFileName = "DmelChr4_LTRharvest_expected_with_default_params.fa"
-        try:
-            shutil.rmtree("MCLtmpDirectory")
-            os.remove(self._inputFileName)
-        except:
-            pass
-        try:
-            os.symlink("%s/Tools/%s" % (os.environ["REPET_DATA"], self._inputFileName), self._inputFileName)
-        except:
-            pass
-        self._outputFileName = "%s_MCL.fa" % os.path.splitext(self._inputFileName)[0]
-        
-    def tearDown(self):
-        try:
-            os.remove(self._inputFileName)
-            os.remove(self._outputFileName)
-            shutil.rmtree("MCLtmpDirectory")
-        except:
-            pass
-        try:
-            os.remove("DmelChr4_LTRharvest_expected_with_default_params_MCL.map")
-        except:
-            pass    
-        
-    def test_run(self):
-        iLaunchMCL = LaunchMCL(self._inputFileName, doClean = True, verbosity = 1)
-        iLaunchMCL.run()
-        expFileName = "%s/Tools/DmelChr4_LTRharvest_MCL_expected.fa" % os.environ["REPET_DATA"]
-        self.assertTrue(FileUtils.are2FilesIdentical(expFileName, self._outputFileName))
-
-    def test_run_with_map_file(self):
-        iLaunchMCL = LaunchMCL(self._inputFileName, isCluster2Map = True, doClean = False, verbosity = 1)
-#        iLaunchMCL.setCoverageThreshold(0.60)
-        iLaunchMCL.run()
-        expFastaFileName = "%s/Tools/DmelChr4_LTRharvest_MCL_expected.fa" % os.environ["REPET_DATA"]
-        expMapFileName = "%s/Tools/DmelChr4_LTRharvest_MCL_expected.map" % os.environ["REPET_DATA"]
-        obsMapFileName = "%s.map" % os.path.splitext(self._outputFileName)[0]
-        
-        self.assertTrue(FileUtils.are2FilesIdentical(expFastaFileName, self._outputFileName))
-        self.assertTrue(FileUtils.are2FilesIdentical(expMapFileName, obsMapFileName))
-        
-        os.remove(obsMapFileName)
-
-    def test_run_clusterConsensus_headers(self):
-        os.remove(self._inputFileName)
-        self._inputFileName = "DmelChr4_LTRharvest_MCL_ClusterConsHeaders_input.fa"
-        os.symlink("%s/Tools/%s" % (os.environ["REPET_DATA"], self._inputFileName), self._inputFileName)
-        iLaunchMCL = LaunchMCL(self._inputFileName, isClusterConsensusHeaders = True, doClean = True, verbosity = 1)
-        iLaunchMCL.run()
-        expFastaFileName = "%s/Tools/DmelChr4_LTRharvest_MCL_ClusterConsHeaders_expected.fa" % os.environ["REPET_DATA"]
-        self._outputFileName = "%s_MCL.fa" % os.path.splitext(self._inputFileName)[0]
-        
-        self.assertTrue(FileUtils.are2FilesIdentical(expFastaFileName, self._outputFileName))
-      
-    def test_run_as_script(self):
-        cmd = "LaunchMCL.py -i %s -j -v 6" % self._inputFileName
-        os.system(cmd)
-        expFileName = "%s/Tools/DmelChr4_LTRharvest_MCL_expected.fa" % os.environ["REPET_DATA"]
-        self.assertTrue(FileUtils.are2FilesIdentical(expFileName, self._outputFileName))
-        self.assertTrue(FileUtils.isRessourceExists("MCLtmpDirectory"))
-
-    def test_run_as_script_allParams(self):
-        cmd = "LaunchMCL.py -i %s -j -I 1.5 -T 0.0 -m -v 6" % self._inputFileName
-        os.system(cmd)
-        expFileName = "%s/Tools/DmelChr4_LTRharvest_MCL_expected.fa" % os.environ["REPET_DATA"]
-        self.assertTrue(FileUtils.are2FilesIdentical(expFileName, self._outputFileName))
-        self.assertTrue(FileUtils.isRessourceExists("MCLtmpDirectory"))
-
-    def test_run_as_script_without_join(self):
-        cmd = "LaunchMCL.py -i %s -v 2" % self._inputFileName
-        os.system(cmd)
-        expFileName = "%s/Tools/DmelChr4_LTRharvest_MCL_expected.fa" % os.environ["REPET_DATA"]
-        self.assertTrue(FileUtils.are2FilesIdentical(expFileName, self._outputFileName))
-        self.assertTrue(FileUtils.isRessourceExists("MCLtmpDirectory"))
-        
-if __name__ == "__main__":
-    unittest.main()
\ No newline at end of file
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/tests/Test_F_LaunchMap.py
--- a/commons/launcher/tests/Test_F_LaunchMap.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,41 +0,0 @@
-import unittest
-import os
-import subprocess
-from commons.core.utils.FileUtils import FileUtils
-from commons.launcher.LaunchMap import LaunchMap
-
-class Test_F_LaunchMap(unittest.TestCase):
-
-    def setUp(self):
-        self._fastaFileName = "LaunchMap_seqCluster1.fa"
-        fastaFilePath = "%s/Tools/%s" % (os.environ["REPET_DATA"], self._fastaFileName)
-        os.symlink(fastaFilePath, self._fastaFileName)
-        self._obsFileName = "%s.fa_aln" % self._fastaFileName
-
-    def tearDown(self):
-        os.remove(self._fastaFileName)
-        try:
-            os.remove(self._obsFileName)
-        except: pass
-
-    def test_run_as_script(self):
-        expFileName = "%s/Tools/expLaunchMap_seqCluster1.fa.fa_aln" % os.environ["REPET_DATA"]
-        obsFileName = "obs.fa_aln"
-        cmd = "LaunchMap.py "
-        cmd += "-i %s " % self._fastaFileName
-        cmd += "-o %s " % obsFileName
-        cmd += "-c "
-        process = subprocess.Popen(cmd, shell = True)
-        process.communicate()
-        self.assertTrue(FileUtils.are2FilesIdentical(expFileName, obsFileName))
-        os.remove(obsFileName)
-        
-    def test_run(self):
-        expFileName = "%s/Tools/expLaunchMap_seqCluster1.fa.fa_aln" % os.environ["REPET_DATA"]
-        iLaunchMap = LaunchMap(self._fastaFileName)
-        iLaunchMap.setDoClean(True)
-        iLaunchMap.run()
-        self.assertTrue(FileUtils.are2FilesIdentical(expFileName, self._obsFileName))
-        
-if __name__ == "__main__":
-    unittest.main()
\ No newline at end of file
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/tests/Test_F_LaunchMatcher.py
--- a/commons/launcher/tests/Test_F_LaunchMatcher.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,63 +0,0 @@
-from commons.core.utils.FileUtils import FileUtils
-import unittest
-import os
-import subprocess
-from commons.launcher.LaunchMatcher import LaunchMatcher
-
-class Test_F_LaunchMatcher(unittest.TestCase):
-
-    def setUp(self):
-        self._inFileName = "DmelChr4.align"
-        self._fastaFileName = "DmelChr4.fa"
-        inFilePath = "%s/Tools/%s" % (os.environ["REPET_DATA"], self._inFileName)
-        inFastaPath = "%s/Tools/%s" % (os.environ["REPET_DATA"], self._fastaFileName)
-        try:
-            os.remove(self._inFileName)
-        except:
-            pass
-        os.symlink(inFilePath, self._inFileName)
-        os.symlink(inFastaPath, self._fastaFileName)
-        self._iLaunchMatcher = LaunchMatcher(align=self._inFileName, queryFileName=self._fastaFileName, subjectFileName=self._fastaFileName, doJoin=True, evalue="1e-20", keepConflict=True)
-        self._iLaunchMatcher.setVerbosity(2)
-
-    def tearDown(self):
-        try:
-            FileUtils.removeFilesByPattern("%s*" % self._inFileName)
-            os.remove(self._fastaFileName)
-        except:
-            pass
-
-    def test_run_as_class_1_file(self):
-        expPathFileName = "%s/Tools/DmelChr4.align.match.path" % os.environ["REPET_DATA"]
-        expTabFileName = "%s/Tools/DmelChr4.align.match.tab" % os.environ["REPET_DATA"]
-        
-        obsPathFileName = "%s.match.path" % self._inFileName
-        obsTabFileName = "%s.match.tab" % self._inFileName
-        
-        self._iLaunchMatcher.run()
-        
-        self.assertTrue(FileUtils.are2FilesIdentical(expPathFileName, obsPathFileName))
-        self.assertTrue(FileUtils.are2FilesIdentical(expTabFileName, obsTabFileName))
-
-    def test_run_as_script(self):
-        expPathFileName = "%s/Tools/DmelChr4.align.match.path" % os.environ["REPET_DATA"]
-        expTabFileName = "%s/Tools/DmelChr4.align.match.tab" % os.environ["REPET_DATA"]
-
-        cmd = "LaunchMatcher.py "
-        cmd += "-a %s " % self._inFileName
-        cmd += "-q %s " % self._fastaFileName
-        cmd += "-s %s " % self._fastaFileName
-        cmd += "-o DmelChr4.align "
-        cmd += "-j "
-        cmd += "-k "
-        cmd += "-e 1e-20 "
-        process = subprocess.Popen(cmd, shell = True)
-        process.communicate()
-        obsPathFileName = "%s.match.path" % self._inFileName
-        obsTabFileName = "%s.match.tab" % self._inFileName
-        
-        self.assertTrue(FileUtils.are2FilesIdentical(expPathFileName, obsPathFileName))
-        self.assertTrue(FileUtils.are2FilesIdentical(expTabFileName, obsTabFileName))
-
-if __name__ == "__main__":
-    unittest.main()
\ No newline at end of file
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/tests/Test_F_LaunchMummerPlot.py
--- a/commons/launcher/tests/Test_F_LaunchMummerPlot.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
b'@@ -1,166 +0,0 @@\n-import unittest\n-import os\n-from commons.core.utils.FileUtils import FileUtils\n-from commons.launcher.LaunchMummerPlot import LaunchMummerPlot\n-\n-class Test_F_LaunchMummerPlot(unittest.TestCase):\n-    \n-    def setUp(self):\n-        self._queryFastaFileName = "query.fa"\n-        self._refFastaFileName = "ref.fa"\n-        self._writeInputFastaFiles()\n-        \n-        self._inputDeltaFileName = "inputNucmer.delta"\n-        self._writeInputDeltaFileName()\n-        \n-        self._expGpFileName = "expMummerPlot.gp"\n-        self._obsGpFileName = "obsMummerPlot.gp"\n-        self._obsPngFileName = "obsMummerPlot.png"\n-        \n-    def tearDown(self):\n-        try:\n-            os.remove(self._queryFastaFileName)\n-        except:pass\n-        try:\n-            os.remove(self._refFastaFileName)\n-        except:pass\n-        try:\n-            os.remove(self._inputDeltaFileName)\n-        except:pass\n-        try:\n-            os.remove(self._expGpFileName)\n-        except:pass\n-        try:\n-            os.remove(self._obsGpFileName)\n-        except:pass\n-        try:\n-            os.remove(self._obsPngFileName)\n-        except:pass\n-        \n-    \n-    def test_run(self):\n-        self._writeExpGpFile()\n-        ilaunchMummerPlot = LaunchMummerPlot(self._inputDeltaFileName, self._refFastaFileName, self._queryFastaFileName,"obsMummerPlot",fat=True, filter=True, clean=True, verbosity=1)\n-        ilaunchMummerPlot.run()\n-        self.assertTrue(FileUtils.are2FilesIdentical(self._expGpFileName, self._obsGpFileName))\n-        \n-    def test_run_as_script(self):\n-        self._writeExpGpFile()\n-        cmd = \'LaunchMummerPlot.py --input %s --Qfile %s --Rfile %s --prefix %s --fat --filter --clean\' % (self._inputDeltaFileName, self._refFastaFileName, self._queryFastaFileName, "obsMummerPlot")\n-        os.system(cmd)\n-        self.assertTrue(FileUtils.are2FilesIdentical(self._expGpFileName, self._obsGpFileName))\n-        \n-    def _writeInputFastaFiles(self):\n-        InputFile = open(self._queryFastaFileName, \'w\')\n-        InputFile.write(\'>Bovc-tA2:classI:SINE:SINE2/tRNA\\n\')\n-        InputFile.write(\'GGGCTTCCCTGGTAGCTCAGCTGGTAAAGAATCCGCCTGCAATGCAGGAGACCCCGGTTC\\n\')\n-        InputFile.write(\'GATTCCTGGGTCGGGAAGATCCCCTGGAGAAGGGATAGGCTACCCACTCCAGTATTCTTG\\n\')\n-        InputFile.write(\'GGCTTCCCTGGTGGCTCAGACGGTAAAGAATCCGCCTGCAATGCGGGAGACCTGGGTTCG\\n\')\n-        InputFile.write(\'ATCCCTGGGTTGGGAAGATCCCCTGGAGGAGGGCATGGCAACCCACTCCAGTATTCTTGC\\n\')\n-        InputFile.write(\'CTGGAGAATCCCCATGGACAGAGGAGCCTGGCGGGCTACAGTCCATGGGGTCGCAAAGAG\\n\')\n-        InputFile.write(\'TCGGACACGACTGAGCGACTAAGCACAGCACAG\\n\')\n-        InputFile.write(\'>SUSINE2:classI:SINE:SINE2/tRNA\\n\')\n-        InputFile.write(\'GGGAGTTCTCTGATGGCCTAGCGGGTTGAGGCTCCTGCGTTCTCACCGCTGTGGCTCTGG\\n\')\n-        InputFile.write(\'TTGCTGCTGTGCGGCGTAGGTTCAATCCCTGGCCCAGGAATTCCCACATACTGCCTGTGT\\n\')\n-        InputFile.write(\'GGCAAAAAAGAAAAAAAAAAAAAATACAAAAAAAAAAAAAACAAGAGAGAACCTGAAATA\\n\')\n-        InputFile.write(\'AACGTTGCAACTCTCATTNAAAAAAAAAAA\\n\')\n-        InputFile.write(\'>SINE1A_SS:classI:SINE:SINE2/tRNA\\n\')\n-        InputFile.write(\'GGGAGTTCTCTTGTGGCACAGCAGGTTAAGGATCCAGCGTTGTCACTGCAGTGGCTTGGG\\n\')\n-        InputFile.write(\'TCGCTGCTGTGGCACGGGTTCAATCCCTGGCCCAGGAACTTCCACATGCCACGGGCATGG\\n\')\n-        InputFile.write(\'CCAAAAAAAAA\\n\')\n-        InputFile.write(\'>SINE2-1_Pca:classI:SINE:SINE2/tRNA\\n\')\n-        InputFile.write(\'GGGCAGTGGTGGTTCAGTGGTAGAATTCTTGCCTTCCATGCGGGAGACCCGGGTTCGATT\\n\')\n-        InputFile.write(\'CCCGGCCAGTGCACCTCATGCGCAGCCACCACCCGTCTGTCAGTGGAGGCTTGCGTGTTG\\n\')\n-        InputFile.write(\'CTGTGATGCTGAACAGGTTTCAGCGGAGCTTCCAGACTAAGACGGACTAGGAAGAAAGGC\\n\')\n-        InputFile.write(\'CTGGCGATCTACTTCTGAAAATCAGCCAATGAAAACCCTGTGGATCACAGTGGTCTGATC\\n\')\n-        InputFile.write(\'TGCAACTGATCATGGGGATGGCGCAGGACCGGGCAGCGTTTTGTTCTATTGTGCATGGGG\\n\')\n-        InputFile.write(\'TCGCCATGAGTCGGGCCGACTCGATGGCAGCTAACAACAA\\n\')\n-        InputFile.write(\'>SINE_FR2:classI:SINE:?\\n\')\n-        InputFile.write(\'GGGCGG'..b'ACATCGGGCTCCCTGCATGGAGCCTGCTTCTCCCTCTGCCTG\\n\')\n-        InputFile.write(\'TGTCTCTGCCTCTCTCTCTCTCTGTGTCTCTCATGAATAAATAA\\n\')\n-        InputFile.write(\'>ALPINE1:classI:SINE:SINE2/tRNA\\n\')\n-        InputFile.write(\'GGGGAGGGTATAGCTCAGTGGTAGAGCGCATGCTTAGCATGCACGAGGTCCTGGGTTCAA\\n\')\n-        InputFile.write(\'TCCCCAGTACCTCCATTAAAAATAAATAAATAAATAAACCTAATTACCTCCCCCACCAAA\\n\')\n-        InputFile.write(\'AAAAAAA\\n\')\n-        InputFile.close()\n-        \n-        InputFile = open(self._refFastaFileName, \'w\')\n-        InputFile.write(\'>SINE_FR2:classI:SINE:?\\n\')\n-        InputFile.write(\'GGGCGGCACGGTGGTGTGGTGGTTAGCACTGTTGCCTCACAGCAAGAAGGCCCCGGGTTC\\n\')\n-        InputFile.write(\'GATCCCCGGTTGGGACTGAGGCTGGGGACTTTCTGTGTGGAGTTTGCATGTTCTCCCTGT\\n\')\n-        InputFile.write(\'GCCTGCGTGGGTTCTCTCCGGGTACTCCGGCTTCCTCCCACAGTCCAAAGACATGCATGA\\n\')\n-        InputFile.write(\'TTGGGGATTAGGCTAATTGGAAACTCTAAAATTGCCCGTAGGTGTGAGTGTGAGAGAGAA\\n\')\n-        InputFile.write(\'TGGTTGTTTGTCTATATGTGTTAGCCCTGCGATTGACTGGCGTCCAGTCCAGGGTGTACC\\n\')\n-        InputFile.write(\'CTGCCTCCGCCCATTGTGCTGGGATAGGCTCCAGTCCCCCCG\\n\')\n-        InputFile.write(\'CAAGCGGTAGAAAGTGAGTGAGTGAGTGA\\n\')\n-        InputFile.write(\'>SINEC1B2_CF:classI:SINE:?\\n\')\n-        InputFile.write(\'GGGCAGCCTGGGTGGCTCAGCGGTTTAGCGCCTGCCTTTGGCCCAGGGCGTGATCCTGGA\\n\')\n-        InputFile.write(\'GACCCGGGATCGAGTCCCACATCGGGCTCCCTGCATGGAGCCTGCTTCTCCCTCTGCCTG\\n\')\n-        InputFile.write(\'TGTCTCTGCCTCTCTCTCTCTCTGTGTCTCTCATGAATAAA\\n\')\n-        InputFile.close()\n-        \n-    def _writeExpGpFile(self):\n-        f = open(self._expGpFileName, \'w\')\n-        f.write(\'set terminal png tiny size 800,800\\n\')\n-        f.write(\'set output "obsMummerPlot.png"\\n\')\n-        f.write(\'set xtics rotate ( \\\\\\n\')\n-        f.write(\' "SINE_FR2:classI:SINE:?" 1, \\\\\\n\')\n-        f.write(\' "SINEC1B2_CF:classI:SINE:?" 389, \\\\\\n\')\n-        f.write(\' "SINE1A_SS:classI:SINE:SINE2/tRNA" 552, \\\\\\n\')\n-        f.write(\' "SUSINE2:classI:SINE:SINE2/tRNA" 682, \\\\\\n\')\n-        f.write(\' "Bovc-tA2:classI:SINE:SINE2/tRNA" 891, \\\\\\n\')\n-        f.write(\' "ALPINE1:classI:SINE:SINE2/tRNA" 1223, \\\\\\n\')\n-        f.write(\' "SINE2-1_Pca:classI:SINE:SINE2/tRNA" 1349, \\\\\\n\')\n-        f.write(\' "" 1694 \\\\\\n\')\n-        f.write(\')\\n\')\n-        f.write(\'set ytics ( \\\\\\n\')\n-        f.write(\' "SINE_FR2:classI:SINE:?" 1, \\\\\\n\')\n-        f.write(\' "SINEC1B2_CF:classI:SINE:?" 371, \\\\\\n\')\n-        f.write(\' "" 532 \\\\\\n\')\n-        f.write(\')\\n\')\n-        f.write(\'set size 1,1\\n\')\n-        f.write(\'set grid\\n\')\n-        f.write(\'unset key\\n\')\n-        f.write(\'set border 0\\n\')\n-        f.write(\'set tics scale 0\\n\')\n-        f.write(\'set xlabel "REF"\\n\')\n-        f.write(\'set ylabel "QRY"\\n\')\n-        f.write(\'set format "%.0f"\\n\')\n-        f.write(\'set mouse format "%.0f"\\n\')\n-        f.write(\'set mouse mouseformat "[%.0f, %.0f]"\\n\')\n-        f.write(\'set mouse clipboardformat "[%.0f, %.0f]"\\n\')\n-        f.write(\'set xrange [1:1694]\\n\')\n-        f.write(\'set yrange [1:532]\\n\')\n-        f.write(\'set style line 1  lt 1 lw 3 pt 6 ps 1\\n\')\n-        f.write(\'set style line 2  lt 3 lw 3 pt 6 ps 1\\n\')\n-        f.write(\'set style line 3  lt 2 lw 3 pt 6 ps 1\\n\')\n-        f.write(\'plot \\\\\\n\')\n-        f.write(\' "obsMummerPlot.fplot" title "FWD" w lp ls 1, \\\\\\n\')\n-        f.write(\' "obsMummerPlot.rplot" title "REV" w lp ls 2\\n\')\n-        f.write(\'\')\n-        f.close()\n-        \n-    def _writeInputDeltaFileName(self):\n-        f = open(self._inputDeltaFileName, \'w\')\n-        f.write("%s %s\\n" %(os.path.abspath(self._queryFastaFileName), os.path.abspath(self._refFastaFileName)))\n-        f.write(\'NUCMER\\n\')\n-        f.write(\'>SINE_FR2:classI:SINE:? SINE_FR2:classI:SINE:? 389 371\\n\')\n-        f.write(\'1 343 1 343 0 0 0\\n\')\n-        f.write(\'0\\n\')\n-        f.write(\'>SINEC1B2_CF:classI:SINE:? SINEC1B2_CF:classI:SINE:? 164 161\\n\')\n-        f.write(\'1 161 1 161 0 0 0\\n\')\n-        f.write(\'0\\n\')\n-        f.close()\n-        \n-if __name__ == "__main__":\n-    unittest.main()\n-        \n\\ No newline at end of file\n'
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/tests/Test_F_LaunchNucmer.py
--- a/commons/launcher/tests/Test_F_LaunchNucmer.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
b'@@ -1,153 +0,0 @@\n-import unittest\n-import os\n-from commons.core.utils.FileUtils import FileUtils\n-from commons.launcher.LaunchNucmer import LaunchNucmer\n-\n-class Test_F_LaunchNucmer(unittest.TestCase):\n-    \n-    def setUp(self):\n-        self._queryFastaFileName = "query.fa"\n-        self._refFastaFileName = "ref.fa"\n-        self._writeInputFastaFiles()\n-        self._expDeltaFileName = "expNucmer.delta"\n-        self._writeExpDeltaFile()\n-        self._obsDeltaFileName = "obsNucmer.delta"\n-        self._obsCoordFileName= "obsNucmer.coords"\n-        self._expCoordFileName= "expNucmer.coords"\n-        \n-    def tearDown(self):\n-        try:\n-            os.remove(self._queryFastaFileName)\n-        except:pass\n-        try:\n-            os.remove(self._refFastaFileName)\n-        except:pass\n-        try:\n-            os.remove(self._expDeltaFileName)\n-        except:pass\n-        try:\n-            os.remove(self._obsDeltaFileName)\n-        except:pass\n-        \n-    def test_run(self):\n-        ilauncher = LaunchNucmer(self._refFastaFileName, self._queryFastaFileName,"obsNucmer",verbosity=1)\n-        ilauncher.run()\n-        self.assertTrue(FileUtils.are2FilesIdentical(self._expDeltaFileName, self._obsDeltaFileName))\n-        \n-    def test_run_as_script(self):\n-        cmd = \'LaunchNucmer.py --query %s --ref %s --prefix %s\' % (self._refFastaFileName, self._queryFastaFileName, "obsNucmer")\n-        os.system(cmd)\n-        self.assertTrue(FileUtils.are2FilesIdentical(self._expDeltaFileName, self._obsDeltaFileName))\n-        \n-    def test_run_as_script_gencoords_output(self):\n-        self._writeExpGenCoordsFile()\n-        cmd = \'LaunchNucmer.py --query %s --ref %s --prefix %s --gencoords\' % (self._refFastaFileName, self._queryFastaFileName, "obsNucmer")\n-        os.system(cmd)\n-        self.assertTrue(FileUtils.are2FilesIdentical(self._expCoordFileName, self._obsCoordFileName))\n-        os.remove(self._obsCoordFileName)\n-        os.remove(self._expCoordFileName)\n-    \n-    def test_run_as_script_with_mincluster(self):\n-        cmd = \'LaunchNucmer.py --query %s --ref %s --prefix %s --mincluster 30\' % (self._refFastaFileName, self._queryFastaFileName, "obsNucmer")\n-        os.system(cmd)\n-        self.assertTrue(FileUtils.are2FilesIdentical(self._expDeltaFileName, self._obsDeltaFileName))      \n-        \n-    def test_run_as_script_showcoords_output(self):\n-        self._writeExpShowCoordsFile()\n-        cmd = \'LaunchNucmer.py --query %s --ref %s --prefix %s --showcoords\' % (self._refFastaFileName, self._queryFastaFileName, "obsNucmer")\n-        os.system(cmd)\n-        self.assertTrue(FileUtils.are2FilesIdentical(self._expCoordFileName, self._obsCoordFileName))\n-        os.remove(self._obsCoordFileName)\n-        os.remove(self._expCoordFileName) \n-        \n-    def _writeInputFastaFiles(self):\n-        InputFile = open(self._queryFastaFileName, \'w\')\n-        InputFile.write(\'>Bovc-tA2:classI:SINE:SINE2/tRNA\\n\')\n-        InputFile.write(\'GGGCTTCCCTGGTAGCTCAGCTGGTAAAGAATCCGCCTGCAATGCAGGAGACCCCGGTTC\\n\')\n-        InputFile.write(\'GATTCCTGGGTCGGGAAGATCCCCTGGAGAAGGGATAGGCTACCCACTCCAGTATTCTTG\\n\')\n-        InputFile.write(\'GGCTTCCCTGGTGGCTCAGACGGTAAAGAATCCGCCTGCAATGCGGGAGACCTGGGTTCG\\n\')\n-        InputFile.write(\'ATCCCTGGGTTGGGAAGATCCCCTGGAGGAGGGCATGGCAACCCACTCCAGTATTCTTGC\\n\')\n-        InputFile.write(\'CTGGAGAATCCCCATGGACAGAGGAGCCTGGCGGGCTACAGTCCATGGGGTCGCAAAGAG\\n\')\n-        InputFile.write(\'TCGGACACGACTGAGCGACTAAGCACAGCACAG\\n\')\n-        InputFile.write(\'>SUSINE2:classI:SINE:SINE2/tRNA\\n\')\n-        InputFile.write(\'GGGAGTTCTCTGATGGCCTAGCGGGTTGAGGCTCCTGCGTTCTCACCGCTGTGGCTCTGG\\n\')\n-        InputFile.write(\'TTGCTGCTGTGCGGCGTAGGTTCAATCCCTGGCCCAGGAATTCCCACATACTGCCTGTGT\\n\')\n-        InputFile.write(\'GGCAAAAAAGAAAAAAAAAAAAAATACAAAAAAAAAAAAAACAAGAGAGAACCTGAAATA\\n\')\n-        InputFile.write(\'AACGTTGCAACTCTCATTNAAAAAAAAAAA\\n\')\n-        InputFile.write(\'>SINE1A_SS:classI:SINE:SINE2/tRNA\\n\')\n-        InputFile.write(\'GGGAGTTCTCTTGTGGCACAGCAGGTTAAG'..b'GTGAGTGTGAGAGAGAA\\n\')\n-        InputFile.write(\'TGGTTGTTTGTCTATATGTGTTAGCCCTGCGATTGACTGGCGTCCAGTCCAGGGTGTACC\\n\')\n-        InputFile.write(\'CTGCCTCCGCCCATTGTGCTGGGATAGGCTCCAGTCCCCCCGCGACCCTCAGTGGAGGAA\\n\')\n-        InputFile.write(\'CAAGCGGTAGAAAGTGAGTGAGTGAGTGA\\n\')\n-        InputFile.write(\'>SINEC1B2_CF:classI:SINE:?\\n\')\n-        InputFile.write(\'GGGCAGCCTGGGTGGCTCAGCGGTTTAGCGCCTGCCTTTGGCCCAGGGCGTGATCCTGGA\\n\')\n-        InputFile.write(\'GACCCGGGATCGAGTCCCACATCGGGCTCCCTGCATGGAGCCTGCTTCTCCCTCTGCCTG\\n\')\n-        InputFile.write(\'TGTCTCTGCCTCTCTCTCTCTCTGTGTCTCTCATGAATAAATAA\\n\')\n-        InputFile.write(\'>ALPINE1:classI:SINE:SINE2/tRNA\\n\')\n-        InputFile.write(\'GGGGAGGGTATAGCTCAGTGGTAGAGCGCATGCTTAGCATGCACGAGGTCCTGGGTTCAA\\n\')\n-        InputFile.write(\'TCCCCAGTACCTCCATTAAAAATAAATAAATAAATAAACCTAATTACCTCCCCCACCAAA\\n\')\n-        InputFile.write(\'AAAAAAA\\n\')\n-        InputFile.close()\n-        \n-        InputFile = open(self._refFastaFileName, \'w\')\n-        InputFile.write(\'>SINE_FR2:classI:SINE:?\\n\')\n-        InputFile.write(\'GGGCGGCACGGTGGTGTGGTGGTTAGCACTGTTGCCTCACAGCAAGAAGGCCCCGGGTTC\\n\')\n-        InputFile.write(\'GATCCCCGGTTGGGACTGAGGCTGGGGACTTTCTGTGTGGAGTTTGCATGTTCTCCCTGT\\n\')\n-        InputFile.write(\'GCCTGCGTGGGTTCTCTCCGGGTACTCCGGCTTCCTCCCACAGTCCAAAGACATGCATGA\\n\')\n-        InputFile.write(\'TTGGGGATTAGGCTAATTGGAAACTCTAAAATTGCCCGTAGGTGTGAGTGTGAGAGAGAA\\n\')\n-        InputFile.write(\'TGGTTGTTTGTCTATATGTGTTAGCCCTGCGATTGACTGGCGTCCAGTCCAGGGTGTACC\\n\')\n-        InputFile.write(\'CTGCCTCCGCCCATTGTGCTGGGATAGGCTCCAGTCCCCCCG\\n\')\n-        InputFile.write(\'CAAGCGGTAGAAAGTGAGTGAGTGAGTGA\\n\')\n-        InputFile.write(\'>SINEC1B2_CF:classI:SINE:?\\n\')\n-        InputFile.write(\'GGGCAGCCTGGGTGGCTCAGCGGTTTAGCGCCTGCCTTTGGCCCAGGGCGTGATCCTGGA\\n\')\n-        InputFile.write(\'GACCCGGGATCGAGTCCCACATCGGGCTCCCTGCATGGAGCCTGCTTCTCCCTCTGCCTG\\n\')\n-        InputFile.write(\'TGTCTCTGCCTCTCTCTCTCTCTGTGTCTCTCATGAATAAA\\n\')\n-        InputFile.close()\n-        \n-    def _writeExpDeltaFile(self):\n-        f = open(self._expDeltaFileName, \'w\')\n-        f.write("%s %s\\n" %(os.path.abspath(self._queryFastaFileName), os.path.abspath(self._refFastaFileName)))\n-        f.write(\'NUCMER\\n\')\n-        f.write(\'>SINE_FR2:classI:SINE:? SINE_FR2:classI:SINE:? 389 371\\n\')\n-        f.write(\'1 343 1 343 0 0 0\\n\')\n-        f.write(\'0\\n\')\n-        f.write(\'>SINEC1B2_CF:classI:SINE:? SINEC1B2_CF:classI:SINE:? 164 161\\n\')\n-        f.write(\'1 161 1 161 0 0 0\\n\')\n-        f.write(\'0\\n\')\n-        f.close()\n-        \n-    def _writeExpGenCoordsFile(self):\n-        f = open(self._expCoordFileName, \'w\')\n-        f.write("%s %s\\n" %(os.path.abspath(self._queryFastaFileName), os.path.abspath(self._refFastaFileName)))\n-        f.write(\'NUCMER\\n\\n\')\n-        f.write(\'    [S1]     [E1]  |     [S2]     [E2]  |  [LEN 1]  [LEN 2]  |  [% IDY]  | [TAGS]\\n\')\n-        f.write(\'=====================================================================================\\n\')\n-        f.write(\'       1      161  |        1      161  |      161      161  |   100.00  | SINEC1B2_CF:classI:SINE:?\\tSINEC1B2_CF:classI:SINE:?\\n\')\n-        f.write(\'       1      343  |        1      343  |      343      343  |   100.00  | SINE_FR2:classI:SINE:?\\tSINE_FR2:classI:SINE:?\\n\')\n-        f.close()\n-        \n-    def _writeExpShowCoordsFile(self):\n-        f = open(self._expCoordFileName, \'w\')\n-        f.write("%s %s\\n" %(os.path.abspath(self._queryFastaFileName), os.path.abspath(self._refFastaFileName)))\n-        f.write(\'NUCMER\\n\\n\')\n-        f.write(\'[S1]\\t[E1]\\t[S2]\\t[E2]\\t[LEN 1]\\t[LEN 2]\\t[% IDY]\\t[LEN R]\\t[LEN Q]\\t[COV R]\\t[COV Q]\\t[FRM]\\t[TAGS]\\n\')\n-        f.write(\'1\\t161\\t1\\t161\\t161\\t161\\t100.00\\t164\\t161\\t98.17\\t100.00\\t1\\t1\\tSINEC1B2_CF:classI:SINE:?\\tSINEC1B2_CF:classI:SINE:?\\n\')\n-        f.write(\'1\\t343\\t1\\t343\\t343\\t343\\t100.00\\t389\\t371\\t88.17\\t92.45\\t1\\t1\\tSINE_FR2:classI:SINE:?\\tSINE_FR2:classI:SINE:?\\n\')\n-        f.close()\n-                       \n-if __name__ == "__main__":\n-    unittest.main()\n\\ No newline at end of file\n'
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/tests/Test_F_LaunchPhyML.py
--- a/commons/launcher/tests/Test_F_LaunchPhyML.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,83 +0,0 @@
-import unittest
-import os
-from commons.core.utils.FileUtils import FileUtils
-from shutil import rmtree
-from commons.launcher.LaunchPhyML import LaunchPhyML
-
-
-class Test_F_LaunchPhyML(unittest.TestCase):
-    
-    def setUp(self):
-        self._curTestDir = os.getcwd()
-        self._testPrefix = 'test_LRA'
-        try:
-            os.makedirs(self._testPrefix)
-        except:pass
-        os.chdir(self._testPrefix)
-        
-
-        self._inputFastaFileName = "%s_input.fa" % self._testPrefix 
-        self._obsOutputFileName = self._inputFastaFileName +'_obs.phylip'
-        self._expOutputFileName = "%s_exp.phylip" % self._testPrefix 
-        self._writeInputFile()
-        
-#    def tearDown(self):
-#        os.chdir(self._curTestDir)
-#        try:
-#            rmtree(self._testPrefix)
-#        except:pass
-
-    def test_run(self):
-        #phylip use only same length sequences
-        self._writeExpFile()
-        ilauncher = LaunchPhyML(self._inputFastaFileName,verbosity=7)
-        ilauncher.run()
-        self.assertTrue(FileUtils.are2FilesIdentical(self._expOutputFileName, self._obsOutputFileName))
-        
-        
-#    def test_run_as_script(self):
-#        self._writeExpOutputFile_wo_refseq()
-#        cmd = 'LaunchPhyML.py -i %s -o %s -v 5' % (self._inputFastaFileName, self._obsOutputFileName)
-#        os.system(cmd)
-#        self.assertTrue(FileUtils.are2FilesIdentical(self._expOutputFileName, self._obsOutputFileName))    
-
-               
-    def _writeInputFile(self):        
-        InputFile = open(self._inputFastaFileName, 'w')
-        InputFile.write(""">sequence1
-GGGCGGCACGGTGGTGTGGTGGTTAGCACTGTTGCCTCACAGCAAGAAGGCCCCGGGTTC
-GATCCCCGGTTGGGACTGAGGCTGGGGACTTTCTGTGTGGAGTTTGCATGTTCTCCCTGT
-GCCTGCGTGGGTTCTCTCCGGGTACTCCGGCTTCCTCCCACAGTCCAAAG
->sequence2
-GGGCAGCCTGGGTGGCTCAGCGGTTTAGCGCCTGCCTTTGGCCCAGGGCGTGATCCTGGA
-GACCCGGGATCGAGTCCCACATCGGGCTCCCTGCATGGAGCCTGCTTCTCCCTCTGCCTG
-GGGCGGCACGGTGGTGTGGTGGTTAGCACTGTTGCCTCACAGCAAGAAGG
->sequence3
-ATCTTAGTTTTGCTGAGCGCCTTCATGGCTGCTTGACTATCAGACAGTATAGCAATGTCC
-TTGCCATGATAGTTCCTTTTCAGATTAAACTCTGCACAGCGTCCAATAGCACAGACTTCA
-GCTTGAATGCTGGTGTATCTGCCCATTGATTCGTGGTATTTCAACCTGGG
-""")
-        InputFile.close()    
-        
-    def _writeExpFile(self):        
-        InputFile = open(self._expOutputFileName, 'w')
-        InputFile.write(""" 3  170
-sequence1      GGGCGGCACGGTGGTGTGGTGGTTAGCACTGTTGCCTCACAGCAAGAAGG
-sequence2      GGGCAGCCTGGGTGGCTCAGCGGTTTAGCGCCTGCCTTTGGCCCAGGGCG
-sequence3      ATCTTAGTTTTGCTGAGCGCCTTCATGGCTGCTTGACTATCAGACAGTAT
-
-CCCCGGGTTCGATCCCCGGTTGGGACTGAGGCTGGGGACTTTCTGTGTGG
-TGATCCTGGAGACCCGGGATCGAGTCCCACATCGGGCTCCCTGCATGGAG
-AGCAATGTCCTTGCCATGATAGTTCCTTTTCAGATTAAACTCTGCACAGC
-
-AGTTTGCATGTTCTCCCTGTGCCTGCGTGGGTTCTCTCCGGGTACTCCGG
-CCTGCTTCTCCCTCTGCCTGGGGCGGCACGGTGGTGTGGTGGTTAGCACT
-GTCCAATAGCACAGACTTCAGCTTGAATGCTGGTGTATCTGCCCATTGAT
-
-CTTCCTCCCACAGTCCAAAG
-GTTGCCTCACAGCAAGAAGG
-TCGTGGTATTTCAACCTGGG""")
-        InputFile.close()    
-                                   
-if __name__ == "__main__":
-    unittest.main()
\ No newline at end of file
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/tests/Test_F_LaunchPromer.py
--- a/commons/launcher/tests/Test_F_LaunchPromer.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
b'@@ -1,231 +0,0 @@\n-import unittest\n-import os\n-from commons.core.utils.FileUtils import FileUtils\n-from commons.launcher.LaunchPromer import LaunchPromer\n-\n-\n-class Test_F_LaunchPromer(unittest.TestCase):\n-    \n-    def setUp(self):\n-        self._queryFastaFileName = "query.fa"\n-        self._refFastaFileName = "ref.fa"\n-        self._writeInputFastaFiles()\n-        self._expDeltaFileName = "expPromer.delta"\n-        self._writeExpDeltaFile()\n-        self._obsDeltaFileName = "obsPromer.delta"\n-        self._obsCoordFileName= "obsPromer.coords"\n-        self._expCoordFileName= "expPromer.coords"\n-        \n-    def tearDown(self):\n-        try:\n-            os.remove(self._queryFastaFileName)\n-        except:pass\n-        try:\n-            os.remove(self._refFastaFileName)\n-        except:pass\n-        try:\n-            os.remove(self._expDeltaFileName)\n-        except:pass\n-        try:\n-            os.remove(self._obsDeltaFileName)\n-        except:pass\n-        \n-    def test_run(self):\n-        ilauncher = LaunchPromer(self._refFastaFileName, self._queryFastaFileName,"obsPromer",verbosity=1)\n-        ilauncher.run()\n-        self.assertTrue(FileUtils.are2FilesIdentical(self._expDeltaFileName, self._obsDeltaFileName))\n-        \n-    def test_run_as_script(self):\n-        cmd = \'LaunchPromer.py --query %s --ref %s --prefix %s\' % (self._refFastaFileName, self._queryFastaFileName, "obsPromer")\n-        os.system(cmd)\n-        self.assertTrue(FileUtils.are2FilesIdentical(self._expDeltaFileName, self._obsDeltaFileName))\n-        \n-    def test_run_as_script_gencoords_output(self):\n-        self._writeExpGenCoordsFile()\n-        cmd = \'LaunchPromer.py --query %s --ref %s --prefix %s --gencoords\' % (self._refFastaFileName, self._queryFastaFileName, "obsPromer")\n-        os.system(cmd)\n-        self.assertTrue(FileUtils.are2FilesIdentical(self._expCoordFileName, self._obsCoordFileName))\n-        os.remove(self._obsCoordFileName)\n-        os.remove(self._expCoordFileName)\n-    \n-    def test_run_as_script_with_mincluster(self):\n-        cmd = \'LaunchPromer.py --query %s --ref %s --prefix %s --mincluster 30\' % (self._refFastaFileName, self._queryFastaFileName, "obsPromer")\n-        os.system(cmd)\n-        self.assertTrue(FileUtils.are2FilesIdentical(self._expDeltaFileName, self._obsDeltaFileName))      \n-        \n-    def test_run_as_script_showcoords_output(self):\n-        self._writeExpShowCoordsFile()\n-        cmd = \'LaunchPromer.py --query %s --ref %s --prefix %s --showcoords\' % (self._refFastaFileName, self._queryFastaFileName, "obsPromer")\n-        os.system(cmd)\n-        self.assertTrue(FileUtils.are2FilesIdentical(self._expCoordFileName, self._obsCoordFileName))\n-        os.remove(self._obsCoordFileName)\n-        os.remove(self._expCoordFileName) \n-        \n-    def _writeInputFastaFiles(self):\n-        InputFile = open(self._queryFastaFileName, \'w\')\n-        InputFile.write(\'>Bovc-tA2:classI:SINE:SINE2/tRNA\\n\')\n-        InputFile.write(\'GGGCTTCCCTGGTAGCTCAGCTGGTAAAGAATCCGCCTGCAATGCAGGAGACCCCGGTTC\\n\')\n-        InputFile.write(\'GATTCCTGGGTCGGGAAGATCCCCTGGAGAAGGGATAGGCTACCCACTCCAGTATTCTTG\\n\')\n-        InputFile.write(\'GGCTTCCCTGGTGGCTCAGACGGTAAAGAATCCGCCTGCAATGCGGGAGACCTGGGTTCG\\n\')\n-        InputFile.write(\'ATCCCTGGGTTGGGAAGATCCCCTGGAGGAGGGCATGGCAACCCACTCCAGTATTCTTGC\\n\')\n-        InputFile.write(\'CTGGAGAATCCCCATGGACAGAGGAGCCTGGCGGGCTACAGTCCATGGGGTCGCAAAGAG\\n\')\n-        InputFile.write(\'TCGGACACGACTGAGCGACTAAGCACAGCACAG\\n\')\n-        InputFile.write(\'>SUSINE2:classI:SINE:SINE2/tRNA\\n\')\n-        InputFile.write(\'GGGAGTTCTCTGATGGCCTAGCGGGTTGAGGCTCCTGCGTTCTCACCGCTGTGGCTCTGG\\n\')\n-        InputFile.write(\'TTGCTGCTGTGCGGCGTAGGTTCAATCCCTGGCCCAGGAATTCCCACATACTGCCTGTGT\\n\')\n-        InputFile.write(\'GGCAAAAAAGAAAAAAAAAAAAAATACAAAAAAAAAAAAAACAAGAGAGAACCTGAAATA\\n\')\n-        InputFile.write(\'AACGTTGCAACTCTCATTNAAAAAAAAAAA\\n\')\n-        InputFile.write(\'>SINE1A_SS:classI:SINE:SINE2/tRNA\\n\')\n-        InputFile.write(\'GGGAGTTCTCTTGTGGCACAGCAGGTTA'..b'.00   100.00     1.89  |  3  3  SINEC1B2_CF:classI:SINE:?\\tSINEC1B2_CF:classI:SINE:?\\n\')\n-            f.write(\'     159        1  |      159        1  |      159      159  |   100.00   100.00     3.77  | -3 -3  SINEC1B2_CF:classI:SINE:?\\tSINEC1B2_CF:classI:SINE:?\\n\')\n-            f.write(\'     160        2  |      160        2  |      159      159  |   100.00   100.00     1.89  | -2 -2  SINEC1B2_CF:classI:SINE:?\\tSINEC1B2_CF:classI:SINE:?\\n\')\n-            f.write(\'     161        3  |      161        3  |      159      159  |   100.00   100.00     0.00  | -1 -1  SINEC1B2_CF:classI:SINE:?\\tSINEC1B2_CF:classI:SINE:?\\n\')\n-            f.write(\'       1      387  |        1      369  |      387      369  |    95.35    95.35     3.88  |  1  1  SINE_FR2:classI:SINE:?\\tSINE_FR2:classI:SINE:?\\n\')\n-            f.write(\'       2      388  |        2      370  |      387      369  |    95.35    95.35     3.10  |  2  2  SINE_FR2:classI:SINE:?\\tSINE_FR2:classI:SINE:?\\n\')\n-            f.write(\'       3      389  |        3      371  |      387      369  |    95.35    95.35     6.20  |  3  3  SINE_FR2:classI:SINE:?\\tSINE_FR2:classI:SINE:?\\n\')\n-            f.write(\'     387        1  |      369        1  |      387      369  |    95.35    95.35     1.94  | -3 -3  SINE_FR2:classI:SINE:?\\tSINE_FR2:classI:SINE:?\\n\')\n-            f.write(\'     388        2  |      370        2  |      387      369  |    95.35    95.35     2.33  | -2 -2  SINE_FR2:classI:SINE:?\\tSINE_FR2:classI:SINE:?\\n\')\n-            f.write(\'     389        3  |      371        3  |      387      369  |    95.35    95.35     1.55  | -1 -1  SINE_FR2:classI:SINE:?\\tSINE_FR2:classI:SINE:?\\n\')\n-    \n-        \n-    def _writeExpShowCoordsFile(self):\n-        with open(self._expCoordFileName, \'w\') as f:\n-            f.write("%s %s\\n" %(os.path.abspath(self._queryFastaFileName), os.path.abspath(self._refFastaFileName)))\n-            f.write(\'PROMER\\n\\n\')\n-            f.write(\'[S1]\\t[E1]\\t[S2]\\t[E2]\\t[LEN 1]\\t[LEN 2]\\t[% IDY]\\t[% SIM]\\t[% STP]\\t[LEN R]\\t[LEN Q]\\t[COV R]\\t[COV Q]\\t[FRM]\\t[TAGS]\\n\')\n-            f.write(\'1\\t159\\t1\\t159\\t159\\t159\\t100.00\\t100.00\\t1.89\\t164\\t161\\t96.95\\t98.76\\t1\\t1\\tSINEC1B2_CF:classI:SINE:?\\tSINEC1B2_CF:classI:SINE:?\\n\')\n-            f.write(\'2\\t160\\t2\\t160\\t159\\t159\\t100.00\\t100.00\\t3.77\\t164\\t161\\t96.95\\t98.76\\t2\\t2\\tSINEC1B2_CF:classI:SINE:?\\tSINEC1B2_CF:classI:SINE:?\\n\')\n-            f.write(\'3\\t161\\t3\\t161\\t159\\t159\\t100.00\\t100.00\\t1.89\\t164\\t161\\t96.95\\t98.76\\t3\\t3\\tSINEC1B2_CF:classI:SINE:?\\tSINEC1B2_CF:classI:SINE:?\\n\')\n-            f.write(\'159\\t1\\t159\\t1\\t159\\t159\\t100.00\\t100.00\\t3.77\\t164\\t161\\t96.95\\t98.76\\t-3\\t-3\\tSINEC1B2_CF:classI:SINE:?\\tSINEC1B2_CF:classI:SINE:?\\n\')\n-            f.write(\'160\\t2\\t160\\t2\\t159\\t159\\t100.00\\t100.00\\t1.89\\t164\\t161\\t96.95\\t98.76\\t-2\\t-2\\tSINEC1B2_CF:classI:SINE:?\\tSINEC1B2_CF:classI:SINE:?\\n\')\n-            f.write(\'161\\t3\\t161\\t3\\t159\\t159\\t100.00\\t100.00\\t0.00\\t164\\t161\\t96.95\\t98.76\\t-1\\t-1\\tSINEC1B2_CF:classI:SINE:?\\tSINEC1B2_CF:classI:SINE:?\\n\')\n-            f.write(\'1\\t387\\t1\\t369\\t387\\t369\\t95.35\\t95.35\\t3.88\\t389\\t371\\t99.49\\t99.46\\t1\\t1\\tSINE_FR2:classI:SINE:?\\tSINE_FR2:classI:SINE:?\\n\')\n-            f.write(\'2\\t388\\t2\\t370\\t387\\t369\\t95.35\\t95.35\\t3.10\\t389\\t371\\t99.49\\t99.46\\t2\\t2\\tSINE_FR2:classI:SINE:?\\tSINE_FR2:classI:SINE:?\\n\')\n-            f.write(\'3\\t389\\t3\\t371\\t387\\t369\\t95.35\\t95.35\\t6.20\\t389\\t371\\t99.49\\t99.46\\t3\\t3\\tSINE_FR2:classI:SINE:?\\tSINE_FR2:classI:SINE:?\\n\')\n-            f.write(\'387\\t1\\t369\\t1\\t387\\t369\\t95.35\\t95.35\\t1.94\\t389\\t371\\t99.49\\t99.46\\t-3\\t-3\\tSINE_FR2:classI:SINE:?\\tSINE_FR2:classI:SINE:?\\n\')\n-            f.write(\'388\\t2\\t370\\t2\\t387\\t369\\t95.35\\t95.35\\t2.33\\t389\\t371\\t99.49\\t99.46\\t-2\\t-2\\tSINE_FR2:classI:SINE:?\\tSINE_FR2:classI:SINE:?\\n\')\n-            f.write(\'389\\t3\\t371\\t3\\t387\\t369\\t95.35\\t95.35\\t1.55\\t389\\t371\\t99.49\\t99.46\\t-1\\t-1\\tSINE_FR2:classI:SINE:?\\tSINE_FR2:classI:SINE:?\\n\')\n-\n-if __name__ == "__main__":\n-    unittest.main()\n\\ No newline at end of file\n'
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/tests/Test_F_LaunchRefAlign.py
--- a/commons/launcher/tests/Test_F_LaunchRefAlign.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,72 +0,0 @@
-import unittest
-import os
-from commons.core.utils.FileUtils import FileUtils
-from commons.launcher.LaunchRefAlign import LaunchRefAlign
-
-
-class Test_F_LaunchRefAlign(unittest.TestCase):
-    
-    def setUp(self):
-        self._inputFastaFileName = "input.fa"
-        self._obsOutputFileName = "obs"
-        self._expOutputFileName = "exp"
-        self._writeInputFile()
-        self._writeExpOutputFile()
-        
-#    def tearDown(self):
-#        try:
-#            os.remove(self._inputFastaFileName)
-#        except:pass
-#    
-#        try:
-#            os.remove(self._expOutputFileName)
-#        except:pass
-#        try:
-#            os.remove(self._obsOutputFileName)
-#        except:pass
-#        try:
-#            os.remove("input.fa.2.3.5.80.10.20.15.dat")
-#        except:pass
-    
-    def test_run(self):
-        ilauncher = LaunchRefAlign(self._inputFastaFileName,verbosity=5)
-        ilauncher.run()
-        self.assertTrue(FileUtils.are2FilesIdentical(self._expOutputFileName, self._obsOutputFileName))
-        
-#    def test_run_as_script(self):
-#        cmd = 'LaunchTRF.py -i %s -o %s -v 3' % (self._inputFastaFileName, self._obsTRFOutputFileName)
-#        os.system(cmd)
-#        self.assertTrue(FileUtils.are2FilesIdentical(self._expTRFOutputFileName, self._obsTRFOutputFileName))    
-
-        
-    def _writeInputFile(self):        
-        InputFile = open(self._inputFastaFileName, 'w')
-        InputFile.write('>sequence\n')
-        InputFile.write('GGGCGGCACGGTGGTGTGGTGGTTAGCACTGTTGCCTCACAGCAAGAAGGCCCCGGGTTC\n')
-        InputFile.write('GATCCCCGGTTGGGACTGAGGCTGGGGACTTTCTGTGTGGAGTTTGCATGTTCTCCCTGT\n')
-        InputFile.write('GCCTGCGTGGGTTCTCTCCGGGTACTCCGGCTTCCTCCCACAGTCCAAAGACATGCATGA\n')
-        InputFile.write('TTGGGGATTAGGCTAATTGGAAACTCTAAAATTGCCCGTAGGTGTGAGTGTGAGAGAGAA\n')
-        InputFile.write('TGGTTGTTTGTCTATATGTGTTAGCCCTGCGATTGACTGGCGTCCAGTCCAGGGTGTACC\n')
-        InputFile.write('CTGCCTCCGCCCATTGTGCTGGGATAGGCTCCAGTCCCCCCG\n')
-        InputFile.write('CAAGCGGTAGAAAGTGAGTGAGTGAGTGA\n')
-        InputFile.write('>sequence2\n')
-        InputFile.write('GGGCAGCCTGGGTGGCTCAGCGGTTTAGCGCCTGCCTTTGGCCCAGGGCGTGATCCTGGA\n')
-        InputFile.write('GACCCGGGATCGAGTCCCACATCGGGCTCCCTGCATGGAGCCTGCTTCTCCCTCTGCCTG\n')
-        InputFile.write('TGTCTCTGCCTCTCTCTCTCTCTGTGTCTCTCATGAATAAA\n')
-        InputFile.close()    
-        
-    def _writeExpOutputFile(self):
-        with open(self._expOutputFileName,'w') as expOutputFile:
-            expOutputFile.write("""1\t(GTGGT)2\tsequence\t11\t21
-2\t(GGT)5\tsequence\t10\t23
-3\t(GTGTGA)4\tsequence\t222\t242
-4\t(GTCCA)2\tsequence\t282\t292
-5\t(AGTG)4\tsequence\t355\t371
-6\t(GCCTGTCTCTCCTCT)4\tsequence2\t100\t152
-7\t(CTCTGCCTGTGT)3\tsequence2\t112\t151
-8\t(TC)23\tsequence2\t107\t152
-""")
-
-                       
-if __name__ == "__main__":
-    unittest.main()
\ No newline at end of file
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/tests/Test_F_LaunchRefalign.py
--- a/commons/launcher/tests/Test_F_LaunchRefalign.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,104 +0,0 @@
-import unittest
-import os
-from commons.core.utils.FileUtils import FileUtils
-from commons.launcher.LaunchRefAlign import LaunchRefAlign
-from shutil import rmtree
-
-
-class Test_F_LaunchRefAlign(unittest.TestCase):
-    
-    def setUp(self):
-        self._curTestDir = os.getcwd()
-        self._testPrefix = 'test_LRA'
-        try:
-            os.makedirs(self._testPrefix)
-        except:pass
-        os.chdir(self._testPrefix)
-        
-
-        self._inputFastaFileName = "%s_input.fa" % self._testPrefix 
-        self._obsOutputFileName = self._inputFastaFileName +'.fa_aln'
-        self._expOutputFileName = "%s_exp.fa_aln" % self._testPrefix 
-        self._writeInputFile()
-        
-    def tearDown(self):
-        os.chdir(self._curTestDir)
-        try:
-            rmtree(self._testPrefix)
-        except:pass
-
-    def test_run(self):
-        self._writeExpOutputFile_wo_refseq()
-        ilauncher = LaunchRefAlign(self._inputFastaFileName,verbosity=5)
-        ilauncher.run()
-        self.assertTrue(FileUtils.are2FilesIdentical(self._expOutputFileName, self._obsOutputFileName))
-        
-    def test_run_KeepRefSeq(self):
-        self._writeExpOutputFile_with_refseq()
-        ilauncher = LaunchRefAlign(self._inputFastaFileName,verbosity=5, keepRefseq=True)
-        ilauncher.run()
-        
-        self.assertTrue(FileUtils.are2FilesIdentical(self._expOutputFileName, self._obsOutputFileName))
-        
-    def test_run_as_script(self):
-        self._writeExpOutputFile_wo_refseq()
-        cmd = 'LaunchRefAlign.py -i %s -o %s -v 5' % (self._inputFastaFileName, self._obsOutputFileName)
-        os.system(cmd)
-        self.assertTrue(FileUtils.are2FilesIdentical(self._expOutputFileName, self._obsOutputFileName))    
-
-    def test_run_as_script_KeepRefSeq(self):
-        self._writeExpOutputFile_with_refseq()
-        cmd = 'LaunchRefAlign.py -i %s -r -o %s -v 5' % (self._inputFastaFileName, self._obsOutputFileName)
-        os.system(cmd)
-        self.assertTrue(FileUtils.are2FilesIdentical(self._expOutputFileName, self._obsOutputFileName))   
-               
-    def _writeInputFile(self):        
-        InputFile = open(self._inputFastaFileName, 'w')
-        InputFile.write('>sequence\n')
-        InputFile.write('GGGCGGCACGGTGGTGTGGTGGTTAGCACTGTTGCCTCACAGCAAGAAGGCCCCGGGTTC\n')
-        InputFile.write('GATCCCCGGTTGGGACTGAGGCTGGGGACTTTCTGTGTGGAGTTTGCATGTTCTCCCTGT\n')
-        InputFile.write('GCCTGCGTGGGTTCTCTCCGGGTACTCCGGCTTCCTCCCACAGTCCAAAGACATGCATGA\n')
-        InputFile.write('TTGGGGATTAGGCTAATTGGAAACTCTAAAATTGCCCGTAGGTGTGAGTGTGAGAGAGAA\n')
-        InputFile.write('TGGTTGTTTGTCTATATGTGTTAGCCCTGCGATTGACTGGCGTCCAGTCCAGGGTGTACC\n')
-        InputFile.write('CTGCCTCCGCCCATTGTGCTGGGATAGGCTCCAGTCCCCCCG\n')
-        InputFile.write('CAAGCGGTAGAAAGTGAGTGAGTGAGTGA\n')
-        InputFile.write('>sequence2\n')
-        InputFile.write('GGGCAGCCTGGGTGGCTCAGCGGTTTAGCGCCTGCCTTTGGCCCAGGGCGTGATCCTGGA\n')
-        InputFile.write('GACCCGGGATCGAGTCCCACATCGGGCTCCCTGCATGGAGCCTGCTTCTCCCTCTGCCTG\n')
-        InputFile.write('TGTCTCTGCCTCTCTCTCTCTCTGTGTCTCTCATGAATAAA\n')
-        InputFile.close()    
-        
-    def _writeExpOutputFile_wo_refseq(self):
-        with open(self._expOutputFileName,'w') as expOutputFile:
-            expOutputFile.write(""">sequence2
-GGGCAGC-CGGTGGTGCGGT--TTAGCGCTGTTGGCCCAGGGCGTGATGGACCCGGGATC
-GATCCCACATCGGG--------------CTCCCTGCATGGAGCCTGC---TTCTCCCTCT
-GCCTGTGTCTCTTCTCTC------------------------------------------
-------------------------------------------------------------
-----------TCTCTCTGTGTCTCTCATGA-ATAAA------------------------
-------------------------------------------------------------
------------
-""")
-            
-    def _writeExpOutputFile_with_refseq(self):
-        with open(self._expOutputFileName,'w') as expOutputFile:
-            expOutputFile.write(""">sequence
-GGGCGGCACGGTGGTGTGGTGGTTAGCACTGTTGCCTCACAGCAAGAAGGCCCCGGGTTC
-GATCCCCGGTTGGGACTGAGGCTGGGGACTTTCTGTGTGGAGTTTGCATGTTCTCCCTGT
-GCCTGCGTGGGTTCTCTCCGGGTACTCCGGCTTCCTCCCACAGTCCAAAGACATGCATGA
-TTGGGGATTAGGCTAATTGGAAACTCTAAAATTGCCCGTAGGTGTGAGTGTGAGAGAGAA
-TGGTTGTTTGTCTATATGTGTTAGCCCTGCGATTGACTGGCGTCCAGTCCAGGGTGTACC
-CTGCCTCCGCCCATTGTGCTGGGATAGGCTCCAGTCCCCCCGCAAGCGGTAGAAAGTGAG
-TGAGTGAGTGA
->sequence2
-GGGCAGC-CGGTGGTGCGGT--TTAGCGCTGTTGGCCCAGGGCGTGATGGACCCGGGATC
-GATCCCACATCGGG--------------CTCCCTGCATGGAGCCTGC---TTCTCCCTCT
-GCCTGTGTCTCTTCTCTC------------------------------------------
-------------------------------------------------------------
-----------TCTCTCTGTGTCTCTCATGA-ATAAA------------------------
-------------------------------------------------------------
------------
-""")
-                               
-if __name__ == "__main__":
-    unittest.main()
\ No newline at end of file
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/tests/Test_F_LaunchRepeatMasker.py
--- a/commons/launcher/tests/Test_F_LaunchRepeatMasker.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,110 +0,0 @@
-import unittest
-import os
-from commons.core.utils.FileUtils import FileUtils
-from commons.launcher.LaunchRepeatMasker import LaunchRepeatMasker
-
-
-class Test_F_RepeatMasker(unittest.TestCase):
-    
-    def setUp(self):
-        self._queryFastaFileName = "query.fa"
-        self._libFastaFileName = "lib.fa"
-        self._expMaskedQueryFileName = "expMaskedQuery.fa"
-        self._obsMaskedQueryFileName = "%s.masked" % self._queryFastaFileName
-        
-        self._expCatFileName = "expCat.fa"
-        self._obsCatFileName = "%s.cat" % self._queryFastaFileName
-        
-        self._writeInputFastaFiles()
-        self._writeExpMaskedQueryFile()
-        self._writeExpCatFile()
-   
-    def tearDown(self):
-        os.remove(self._queryFastaFileName)
-        os.remove(self._libFastaFileName)
-        os.remove(self._expMaskedQueryFileName)
-        os.remove(self._obsMaskedQueryFileName)
-        os.remove(self._expCatFileName)
-        os.remove(self._obsCatFileName)
-        os.remove("%s.tbl" % self._queryFastaFileName)
-        os.remove("%s.out" % self._queryFastaFileName)
-        os.remove("%s.ori.out" % self._queryFastaFileName)
-        
-    def test_run(self):
-        ilauncher = LaunchRepeatMasker(self._queryFastaFileName, self._libFastaFileName,verbosity=1 )
-        ilauncher.run()
-        self.assertTrue(FileUtils.are2FilesIdentical(self._obsMaskedQueryFileName, self._expMaskedQueryFileName))
-        
-    def test_run_as_script(self):
-        #FIXME : change path to launcher
-        cmd = 'python %s/commons/launcher/LaunchRepeatMasker.py -q %s -l %s' % (os.environ["REPET_PATH"],self._queryFastaFileName, self._libFastaFileName)
-        os.system(cmd)
-        self.assertTrue(FileUtils.are2FilesIdentical(self._obsMaskedQueryFileName, self._expMaskedQueryFileName))
-        
-    def _writeInputFastaFiles(self):
-        InputFile = open(self._queryFastaFileName, 'w')
-        InputFile.write('>Bovc-tA2:classI:SINE:SINE2/tRNA\n')
-        InputFile.write('GGGCTTCCCTGGTAGCTCAGCTGGTAAAGAATCCGCCTGCAATGCAGGAGACCCCGGTTC\n')
-        InputFile.write('GATTCCTGGGTCGGGAAGATCCCCTGGAGAAGGGATAGGCTACCCACTCCAGTATTCTTG\n')
-        InputFile.write('GGCTTCCCTGGTGGCTCAGACGGTAAAGAATCCGCCTGCAATGCGGGAGACCTGGGTTCG\n')
-        InputFile.write('ATCCCTGGGTTGGGAAGATCCCCTGGAGGAGGGCATGGCAACCCACTCCAGTATTCTTGC\n')
-        InputFile.write('CTGGAGAATCCCCATGGACAGAGGAGCCTGGCGGGCTACAGTCCATGGGGTCGCAAAGAG\n')
-        InputFile.write('TCGGACACGACTGAGCGACTAAGCACAGCACAGGTCTTTCCTGCCACTTACCTCCTTCCA\n')
-        InputFile.write('GGGCGGCACGGTGGTGTGGTGGTTAGCACTGTTGCCTCACAGCAAGAAGGCCCCGGGTTC\n')
-        InputFile.write('GATCCCCGGTTGGGACTGAGGCTGGGGACTTTCTGTGTGGAGTTTGCATGTTCTCCCTGT\n')
-        InputFile.write('GCCTGCGTGGGTTCTCTCCGGGTACTCCGGCTTCCTCCCACAGTCCAAAGACATGCATGA\n')
-        InputFile.write('TTGGGGATTAGGCTAATTGGAAACTCTAAAATTGCCCGTAGGTGTGAGTGTGAGAGAGAA\n')
-        InputFile.write('TGGTTGTTTGTCTATATGTGTTAGCCCTGCGATTGACTGGCGTCCAGTCCAGGGTGTACC\n')
-        InputFile.write('CTGCCTCCGCCCATTGTGCTGGGATAGGCTCCAGTCCCCCCGCGACCCTCAGTGGAGGAA\n')
-        InputFile.write('GGGCAGCCTGGGTGGCTCAGCGGTTTAGCGCCTGCCTTTGGCCCAGGGCGTGATCCTGGA\n')
-        InputFile.write('GACCCGGGATCGAGTCCCACATCGGGCTCCCTGCATGGAGCCTGCTTCTCCCTCTGCCTG\n')
-        InputFile.write('GGGGAGGGTATAGCTCAGTGGTAGAGCGCATGCTTAGCATGCACGAGGTCCTGGGTTCAA\n')
-        InputFile.write('TCCCCAGTACCTCCATTAAAAATAAATAAATAAATAAACCTAATTACCTCCCCCACCAAA\n')
-        InputFile.write('AAAAAAA\n')
-        InputFile.close()
-        
-        InputFile = open(self._libFastaFileName, 'w')
-        InputFile.write('>RefLib\n')
-        InputFile.write('GGGCGGCACGGTGGTGTGGTGGTTAGCACTGTTGCCTCACAGCAAGAAGGCCCCGGGTTC\n')
-        InputFile.write('GATCCCCGGTTGGGACTGAGGCTGGGGACTTTCTGTGTGGAGTTTGCATGTTCTCCCTGT\n')
-        InputFile.close()
-        
-    def _writeExpMaskedQueryFile(self):
-        f = open(self._expMaskedQueryFileName, 'w')  
-        f.write('>Bovc-tA2:classI:SINE:SINE2/tRNA\n')
-        f.write('GGGCTTCCCTGGTAGCTCAGCTGGTAAAGAATCCGCCTGCAATGCAGGAG\n')
-        f.write('ACCCCGGTTCGATTCCTGGGTCGGGAAGATCCCCTGGAGAAGGGATAGGC\n')
-        f.write('TACCCACTCCAGTATTCTTGGGCTTCCCTGGTGGCTCAGACGGTAAAGAA\n')
-        f.write('TCCGCCTGCAATGCGGGAGACCTGGGTTCGATCCCTGGGTTGGGAAGATC\n')
-        f.write('CCCTGGAGGAGGGCATGGCAACCCACTCCAGTATTCTTGCCTGGAGAATC\n')
-        f.write('CCCATGGACAGAGGAGCCTGGCGGGCTACAGTCCATGGGGTCGCAAAGAG\n')
-        f.write('TCGGACACGACTGAGCGACTAAGCACAGCACAGGTCTTTCCTGCCACTTA\n')
-        f.write('CCTCCTTCCANNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN\n')
-        f.write('NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN\n')
-        f.write('NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNGCCTGCGTGGGTTCTCTCCG\n')
-        f.write('GGTACTCCGGCTTCCTCCCACAGTCCAAAGACATGCATGATTGGGGATTA\n')
-        f.write('GGCTAATTGGAAACTCTAAAATTGCCCGTAGGTGTGAGTGTGAGAGAGAA\n')
-        f.write('TGGTTGTTTGTCTATATGTGTTAGCCCTGCGATTGACTGGCGTCCAGTCC\n')
-        f.write('AGGGTGTACCCTGCCTCCGCCCATTGTGCTGGGATAGGCTCCAGTCCCCC\n')
-        f.write('CGCGACCCTCAGTGGAGGAAGGGCAGCCTGGGTGGCTCAGCGGTTTAGCG\n')
-        f.write('CCTGCCTTTGGCCCAGGGCGTGATCCTGGAGACCCGGGATCGAGTCCCAC\n')
-        f.write('ATCGGGCTCCCTGCATGGAGCCTGCTTCTCCCTCTGCCTGGGGGAGGGTA\n')
-        f.write('TAGCTCAGTGGTAGAGCGCATGCTTAGCATGCACGAGGTCCTGGGTTCAA\n')
-        f.write('TCCCCAGTACCTCCATTAAAAATAAATAAATAAATAAACCTAATTACCTC\n')
-        f.write('CCCCACCAAAAAAAAAA\n')
-        f.close()
-        
-    def _writeExpCatFile(self):
-        f = open(self._expCatFileName, 'w')  
-        f.write('958 0.00 0.00 0.00 Bovc-tA2:classI:SINE:SINE2/tRNA 361 480 (487) RefLib 1 120 (0) 5\n')
-        f.write('## Total Sequences: 1\n')
-        f.write('## Total Length: 967\n')
-        f.write('## Total NonMask ( excluding >20bp runs of N/X bases ): 967\n')
-        f.write('## Total NonSub ( excluding all non ACGT bases ):967\n')
-        f.write('RepeatMasker version open-3.2.6 , default mode\n')
-        f.write('run with blastp version 2.0MP-WashU\n')
-        f.write('RepBase Update 20080801, RM database version 20080801\n')
-        f.close()
-                       
-if __name__ == "__main__":
-    unittest.main()
\ No newline at end of file
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/tests/Test_F_LaunchTRF.py
--- a/commons/launcher/tests/Test_F_LaunchTRF.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,84 +0,0 @@
-import unittest
-import os
-from commons.core.utils.FileUtils import FileUtils
-from commons.launcher.LaunchTRF import LaunchTRF
-
-
-class Test_F_LaunchTRF(unittest.TestCase):
-    
-    def setUp(self):
-        self._inputFastaFileName = "input.fa"
-        self._obsTRFOutputFileName = "obsTRF.TRF.set"
-        self._expTRFOutputFileName = "expTRF.TRF.set"
-        self._writeInputFile()
-        self._writeExpTRFOutputFile()
-        
-    def tearDown(self):
-        try:
-            os.remove(self._inputFastaFileName)
-        except:pass
-    
-        try:
-            os.remove(self._expTRFOutputFileName)
-        except:pass
-        try:
-            os.remove(self._obsTRFOutputFileName)
-        except:pass
-        try:
-            os.remove("input.fa.2.3.5.80.10.20.15.dat")
-        except:pass
-    
-    def test_run(self):
-        ilauncher = LaunchTRF(self._inputFastaFileName,self._obsTRFOutputFileName,verbosity=5)
-        ilauncher.run()
-        self.assertTrue(FileUtils.are2FilesIdentical(self._expTRFOutputFileName, self._obsTRFOutputFileName))
-        
-    def test_run_as_script(self):
-        cmd = 'LaunchTRF.py -i %s -o %s -v 3' % (self._inputFastaFileName, self._obsTRFOutputFileName)
-        os.system(cmd)
-        self.assertTrue(FileUtils.are2FilesIdentical(self._expTRFOutputFileName, self._obsTRFOutputFileName))    
-
-    def test_run_as_scriptNoOutputGiven(self):
-        cmd = 'LaunchTRF.py -i %s -v 3' % (self._inputFastaFileName)
-        os.system(cmd)
-        self._obsTRFOutputFileName = "input.fa.TRF.set"
-        self.assertTrue(FileUtils.are2FilesIdentical(self._expTRFOutputFileName, self._obsTRFOutputFileName))  
-        
-    def test_run_as_scriptNoOutputGivenDoClean(self):
-        cmd = 'LaunchTRF.py -i %s -c -v 3' % (self._inputFastaFileName)
-        os.system(cmd)
-        self._obsTRFOutputFileName = "input.fa.TRF.set"
-        datFilePath = os.path.join(os.getcwd(),"%s.2.3.5.80.10.20.15.dat" % self._inputFastaFileName)
-        self.assertFalse(os.path.exists(datFilePath))
-        
-    def _writeInputFile(self):        
-        InputFile = open(self._inputFastaFileName, 'w')
-        InputFile.write('>sequence\n')
-        InputFile.write('GGGCGGCACGGTGGTGTGGTGGTTAGCACTGTTGCCTCACAGCAAGAAGGCCCCGGGTTC\n')
-        InputFile.write('GATCCCCGGTTGGGACTGAGGCTGGGGACTTTCTGTGTGGAGTTTGCATGTTCTCCCTGT\n')
-        InputFile.write('GCCTGCGTGGGTTCTCTCCGGGTACTCCGGCTTCCTCCCACAGTCCAAAGACATGCATGA\n')
-        InputFile.write('TTGGGGATTAGGCTAATTGGAAACTCTAAAATTGCCCGTAGGTGTGAGTGTGAGAGAGAA\n')
-        InputFile.write('TGGTTGTTTGTCTATATGTGTTAGCCCTGCGATTGACTGGCGTCCAGTCCAGGGTGTACC\n')
-        InputFile.write('CTGCCTCCGCCCATTGTGCTGGGATAGGCTCCAGTCCCCCCG\n')
-        InputFile.write('CAAGCGGTAGAAAGTGAGTGAGTGAGTGA\n')
-        InputFile.write('>sequence2\n')
-        InputFile.write('GGGCAGCCTGGGTGGCTCAGCGGTTTAGCGCCTGCCTTTGGCCCAGGGCGTGATCCTGGA\n')
-        InputFile.write('GACCCGGGATCGAGTCCCACATCGGGCTCCCTGCATGGAGCCTGCTTCTCCCTCTGCCTG\n')
-        InputFile.write('TGTCTCTGCCTCTCTCTCTCTCTGTGTCTCTCATGAATAAA\n')
-        InputFile.close()    
-        
-    def _writeExpTRFOutputFile(self):
-        with open(self._expTRFOutputFileName,'w') as expTRFOutputFile:
-            expTRFOutputFile.write("""1\t(GTGGT)2\tsequence\t11\t21
-2\t(GGT)5\tsequence\t10\t23
-3\t(GTGTGA)4\tsequence\t222\t242
-4\t(GTCCA)2\tsequence\t282\t292
-5\t(AGTG)4\tsequence\t355\t371
-6\t(GCCTGTCTCTCCTCT)4\tsequence2\t100\t152
-7\t(CTCTGCCTGTGT)3\tsequence2\t112\t151
-8\t(TC)23\tsequence2\t107\t152
-""")
-
-                       
-if __name__ == "__main__":
-    unittest.main()
\ No newline at end of file
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/tests/Test_F_LaunchTallymer.py
--- a/commons/launcher/tests/Test_F_LaunchTallymer.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,151 +0,0 @@
-import unittest
-import os
-from commons.core.utils.FileUtils import FileUtils
-import shutil
-from commons.launcher.LaunchTallymer import LaunchTallymer
-
-class Test_F_LaunchTallymer(unittest.TestCase):
-
-    def setUp(self):
-        self._inFastaFileName = "%s/Tools/DmelChr4.fa" % os.environ["REPET_DATA"]
-
-    def test_run_output_as_gff_cleaned(self):
-        iLaunchTallymer = LaunchTallymer(self._inFastaFileName,  clean = True, verbosity=2)
-        iLaunchTallymer.run()
-        
-        expFileName = "%s/Tools/DmelChr4.fa.tallymer_k20.gff" % os.environ["REPET_DATA"]
-        obsFileName = "DmelChr4.tallymer.gff"
-        
-        self.assertTrue(FileUtils.are2FilesIdentical(expFileName, obsFileName))
-        os.remove(obsFileName)
-        os.remove("DmelChr4.tallymer.stat")
-        
-    def test_run_with_remote_dir(self):
-        os.makedirs("sourceDir")
-        changedInFastaFileName = os.path.basename(self._inFastaFileName)
-        changedInFastaFilepath = os.path.join("sourceDir",changedInFastaFileName)
-        shutil.copy2(self._inFastaFileName, changedInFastaFilepath)
-        
-        iLaunchTallymer = LaunchTallymer(changedInFastaFilepath,  clean = True, verbosity=2)
-        iLaunchTallymer.run()
-        
-        expFileName = "%s/Tools/DmelChr4.fa.tallymer_k20.gff" % os.environ["REPET_DATA"]
-        obsFileName = "DmelChr4.tallymer.gff"
-        
-        
-        self.assertTrue(FileUtils.are2FilesIdentical(expFileName, obsFileName))
-        obsSourceDirFiles = os.listdir("sourceDir")
-        expSourceDirFiles = [changedInFastaFileName,]
-        self.assertEquals(expSourceDirFiles, obsSourceDirFiles)
-        
-        os.remove(obsFileName)
-        os.remove("DmelChr4.tallymer.stat")
-        shutil.rmtree("sourceDir")
-
-
-    def test_run_output_as_gff_cleaned_changed_minOccs2(self):
-        iLaunchTallymer = LaunchTallymer(self._inFastaFileName, minOccs=2, clean = True, verbosity=2)
-        iLaunchTallymer.run()
-        
-        expFileName = "%s/Tools/DmelChr4.fa.tallymer_k20_minOcc2.gff" % os.environ["REPET_DATA"]
-        obsFileName = "DmelChr4.tallymer.gff"
-        
-        self.assertTrue(FileUtils.are2FilesIdentical(expFileName, obsFileName))
-        os.remove(obsFileName)
-        os.remove("DmelChr4.tallymer.stat")
-        
-    def test_run_output_as_gff_cleaned_relative_input(self):
-        srcFastaFileName = self._inFastaFileName
-        dstFastaFileName = os.path.basename(self._inFastaFileName)
-        shutil.copy2(srcFastaFileName, dstFastaFileName)
-        iLaunchTallymer = LaunchTallymer(dstFastaFileName,  clean = True, verbosity=2)
-        iLaunchTallymer.run()
-        
-        expFileName = "%s/Tools/DmelChr4.fa.tallymer_k20.gff" % os.environ["REPET_DATA"]
-        obsFileName = "DmelChr4.tallymer.gff"
-        
-        self.assertTrue(FileUtils.are2FilesIdentical(expFileName, obsFileName))
-        
-        os.remove(obsFileName)
-        os.remove("DmelChr4.tallymer.stat")
-        os.remove(dstFastaFileName)
-   
-    def test_run_as_script_output_as_gff_cleaned_relative_input_(self):
-        srcFastaFileName = self._inFastaFileName
-        dstFastaFileName = os.path.basename(self._inFastaFileName)
-        shutil.copy2(srcFastaFileName, dstFastaFileName)
-        
-        cmd = 'LaunchTallymer.py -i %s -s 20 -c -v 3' % (self._inFastaFileName)
-        os.system(cmd)
-        expFileName = "%s/Tools/DmelChr4.fa.tallymer_k20.gff" % os.environ["REPET_DATA"]
-        obsFileName = "DmelChr4.tallymer.gff"
-        
-        self.assertTrue(FileUtils.are2FilesIdentical(expFileName, obsFileName))
-        
-        os.remove(obsFileName)
-        os.remove("DmelChr4.tallymer.stat")
-        os.remove(dstFastaFileName)
-        
-    def test_run_output_as_wig_cleaned(self):
-        iLaunchTallymer = LaunchTallymer(self._inFastaFileName, outputFormats="wig", clean=True)
-        iLaunchTallymer.run()
-        
-        expFileName = "%s/Tools/DmelChr4.fa.tallymer_k20.wig" % os.environ["REPET_DATA"]
-        obsFileName = "DmelChr4.tallymer.wig"
-        
-        self.assertTrue(FileUtils.are2FilesIdentical(expFileName, obsFileName))
-        
-        os.remove(obsFileName)
-        os.remove("DmelChr4.tallymer.stat")
-
-    def test_run_output_as_gff_and_wig_k15_cleaned(self):
-        iLaunchTallymer = LaunchTallymer(self._inFastaFileName, merSize=15, outputFormats="wig,gff3", clean=True)
-        iLaunchTallymer.run()
-        
-        expFileName = "%s/Tools/DmelChr4.fa.tallymer_k15.wig" % os.environ["REPET_DATA"]
-        obsFileName = "DmelChr4.tallymer.wig"
-        self.assertTrue(FileUtils.are2FilesIdentical(expFileName, obsFileName))
-        os.remove(obsFileName)
-        
-        expFileName = "%s/Tools/DmelChr4.fa.tallymer_k15.gff3" % os.environ["REPET_DATA"]
-        obsFileName = "DmelChr4.tallymer.gff3"
-        self.assertTrue(FileUtils.are2FilesIdentical(expFileName, obsFileName))
-        os.remove(obsFileName)
-        
-        os.remove("DmelChr4.tallymer.stat")
-
-    def test_run_as_script_run_output_as_gff_and_wig_k15_cleaned(self):
-        logFileName = "test.log"
-        cmd = 'LaunchTallymer.py -i %s -s 15 -f gff,wig,vero -c -v 3 > %s' % (self._inFastaFileName, logFileName)
-        os.system(cmd)
-               
-        expFileName = "%s/Tools/DmelChr4.fa.tallymer_k15.wig" % os.environ["REPET_DATA"]
-        obsFileName = "DmelChr4.tallymer.wig"
-        self.assertTrue(FileUtils.are2FilesIdentical(expFileName, obsFileName))
-        os.remove(obsFileName)
-        
-        expFileName = "%s/Tools/DmelChr4.fa.tallymer_k15.gff3" % os.environ["REPET_DATA"]
-        obsFileName = "DmelChr4.tallymer.gff"
-        self.assertTrue(FileUtils.are2FilesIdentical(expFileName, obsFileName))
-        os.remove(obsFileName)
-        
-        expLogFileName = "exp.log"
-        with open(expLogFileName, "w") as f:
-            f.write(" LaunchTallymer - WARNING - Warning: ignoring invalid formats: <vero>\n")
-            f.write(" LaunchTallymer - INFO - Starting to run tallymer search of sequence DmelChr4.fa \n")
-            f.write(" LaunchTallymer - INFO - Finished running tallymer scan of sequence DmelChr4.fa \n")
-            f.write(" LaunchTallymer - INFO - Starting to run tallymer search to map conversion\n")
-            f.write(" LaunchTallymer - INFO - Finished tallymer search to map conversion\n")
-            f.write(" LaunchTallymer - INFO - Generating wig file\n")
-            f.write(" LaunchTallymer - INFO - Generating gff file\n")
-        obsLogFileName = "obs.log"
-        os.system("cut -d'-' -f4,5,6 %s > %s" % (logFileName, obsLogFileName))
-        self.assertTrue(FileUtils.are2FilesIdentical(expLogFileName, obsLogFileName))
-        
-        os.remove(logFileName)
-        os.remove(expLogFileName)
-        os.remove(obsLogFileName)
-        os.remove("DmelChr4.tallymer.stat")
-        
-if __name__ == "__main__":
-    unittest.main()
\ No newline at end of file
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/tests/Test_LaunchBlastclust.py
--- a/commons/launcher/tests/Test_LaunchBlastclust.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
b'@@ -1,237 +0,0 @@\n-import unittest\n-import time\n-import os\n-from commons.launcher.LaunchBlastclust import LaunchBlastclust\n-from commons.core.utils.FileUtils import FileUtils\n-\n-class Test_LaunchBlastclust( unittest.TestCase ):\n-\n-    def setUp(self):\n-        self._iLaunchBlastclust = LaunchBlastclust()\n-        self._iLaunchBlastclust.setClean()\n-        self._uniqId = "%s_%s" % (time.strftime("%Y%m%d%H%M%S"), os.getpid())\n-\n-    def tearDown(self):\n-        self._iLaunchBlastclust = None\n-        self._uniqId = None\n-\n-    def test_getClustersFromTxtFile(self):\n-        inFileName = "dummyInFile_%s"  % self._uniqId\n-        inF = open(inFileName, "w")\n-        inF.write("seq1 seq3 seq4 \\n")\n-        inF.write("seq2 seq5 \\n")\n-        inF.close()\n-        dExp = {1:["seq1","seq3","seq4"], 2:["seq2","seq5"]}\n-        self._iLaunchBlastclust.setTmpFileName(inFileName)\n-        dObs = self._iLaunchBlastclust.getClustersFromTxtFile()\n-        self.assertEqual(dObs, dExp)\n-        os.remove(inFileName)\n-        \n-    def test_getClusteringResultsInFasta_without_filtering(self):\n-        inFileName = "dummyInFile_%s"  % self._uniqId\n-        inF = open(inFileName, "w")\n-        inF.write(">seq1\\n")\n-        inF.write("gaattgtttactta\\n")\n-        inF.write(">seq2\\n")\n-        inF.write("gaattgtttactta\\n")\n-        inF.write(">seq3\\n")\n-        inF.write("gaattgtttactta\\n")\n-        inF.write(">seq4\\n")\n-        inF.write("gaattgtttactta\\n")\n-        inF.write(">seq5\\n")\n-        inF.write("gaattgtttactta\\n")\n-        inF.close()\n-        \n-        tmpFileName = "%s_blastclust.txt" % self._uniqId\n-        inF = open(tmpFileName, "w")\n-        inF.write("seq1 seq3 seq4 \\n")\n-        inF.write("seq2 seq5 \\n")\n-        inF.close()\n-        self._iLaunchBlastclust.setTmpFileName(tmpFileName)\n-        \n-        fileExp = "getClusteringResultsInFastaExpected.fa"\n-        outF = open(fileExp, "w")\n-        outF.write(">BlastclustCluster1Mb1_seq1\\n")\n-        outF.write("gaattgtttactta\\n")\n-        outF.write(">BlastclustCluster1Mb2_seq3\\n")\n-        outF.write("gaattgtttactta\\n")\n-        outF.write(">BlastclustCluster1Mb3_seq4\\n")\n-        outF.write("gaattgtttactta\\n")\n-        outF.write(">BlastclustCluster2Mb1_seq2\\n")\n-        outF.write("gaattgtttactta\\n")\n-        outF.write(">BlastclustCluster2Mb2_seq5\\n")\n-        outF.write("gaattgtttactta\\n")\n-        outF.close()\n-        \n-        self._iLaunchBlastclust.getClusteringResultsInFasta(inFileName)\n-        fileObs = "%s_Blastclust.fa" % os.path.splitext(inFileName)[0]\n-        \n-        if not FileUtils.are2FilesIdentical(fileObs, fileExp):\n-            print "Files are different"\n-            return\n-        else:\n-            print "Files are identical\\n"\n-\n-        os.remove(inFileName)\n-        os.remove(tmpFileName)\n-        os.remove(fileExp)\n-        os.remove(fileObs)\n-\n-    def test_getClusteringResultsInFasta_with_filtering(self):\n-        inFileName = "dummyInFile_%s"  % self._uniqId\n-        inF = open(inFileName, "w")\n-        inF.write(">seq1\\n")\n-        inF.write("gaattgtttactta\\n")\n-        inF.write(">seq2\\n")\n-        inF.write("gaattgtttactta\\n")\n-        inF.write(">seq3\\n")\n-        inF.write("gaattgtttactta\\n")\n-        inF.write(">seq4\\n")\n-        inF.write("gaattgtttactta\\n")\n-        inF.write(">seq5\\n")\n-        inF.write("gaattgtttactta\\n")\n-        inF.close()\n-        \n-        tmpFileName = "%s_blastclust.txt" % self._uniqId\n-        inF = open(tmpFileName, "w")\n-        inF.write("seq1 seq3 seq4 \\n")\n-        inF.write("seq2\\n")\n-        inF.write("seq5\\n")\n-        inF.close()\n-        self._iLaunchBlastclust.setTmpFileName(tmpFileName)\n-        \n-        fileExp = "getClusteringResultsInFastaExpected.fa"\n-        outF = open(fileExp, "w")\n-        outF.write(">BlastclustCluster1Mb1_seq1\\n")\n-        outF.write("gaattgtttactta\\n")\n-        outF.write(">BlastclustCluster1Mb2_seq3\\n")\n-        outF.write("gaattgtttactta\\n")\n-        outF.write(">Bl'..b'Headers()\n-        dExp = {"seq1":"Header1", "seq2":"Header2", "seq3":"Header3", "seq4":"Header4"}\n-        \n-        self.assertEqual(dObs, dExp)\n-        os.remove(inFileName)\n-        \n-    def test_retrieveInitHeaders(self):\n-        dIn = {"seq1":"Header1", "seq2":"Header2", "seq3":"Header3", "seq4":"Header4"}\n-        \n-        inFileName = "dummyInFile_%s"  % self._uniqId\n-        outFilePrefix = self._uniqId\n-        \n-        tmpFileName = "%s_blastclust.txt" % outFilePrefix\n-        inF = open(tmpFileName, "w")\n-        inF.write("seq1 seq3 seq4\\n")\n-        inF.write("seq2\\n")\n-        inF.close()\n-        \n-        shortHFile = "%s.shortH_Blastclust.fa"  % inFileName\n-        shF = open(shortHFile, "w")\n-        shF.write(">BlastclustCluster1Mb1_seq1\\n")\n-        shF.write("gaattgtttactta\\n")\n-        shF.write(">BlastclustCluster1Mb2_seq3\\n")\n-        shF.write("gaattgtttactta\\n")\n-        shF.write(">BlastclustCluster1Mb3_seq4\\n")\n-        shF.write("gaattgtttactta\\n")\n-        shF.write(">BlastclustCluster2Mb1_seq2\\n")\n-        shF.write("gaattgtttactta\\n")\n-        shF.close()\n-        \n-        fileExp = "retrieveInitHeadersExpected.fa"\n-        outF = open(fileExp, "w")\n-        outF.write(">BlastclustCluster1Mb1_Header1\\n")\n-        outF.write("gaattgtttactta\\n")\n-        outF.write(">BlastclustCluster1Mb2_Header3\\n")\n-        outF.write("gaattgtttactta\\n")\n-        outF.write(">BlastclustCluster1Mb3_Header4\\n")\n-        outF.write("gaattgtttactta\\n")\n-        outF.write(">BlastclustCluster2Mb1_Header2\\n")\n-        outF.write("gaattgtttactta\\n")\n-        outF.close()\n-\n-        self._iLaunchBlastclust.setInputFileName(inFileName)\n-        self._iLaunchBlastclust.setTmpFileName(tmpFileName)\n-        self._iLaunchBlastclust.setOutputFilePrefix(outFilePrefix)\n-        self._iLaunchBlastclust.retrieveInitHeaders(dIn)\n-        fileObs = "%s_Blastclust.fa" % outFilePrefix\n-        \n-        if not FileUtils.are2FilesIdentical(fileObs, fileExp):\n-            print "Files are different"\n-            return\n-        else:\n-            print "Files are identical\\n"\n-        \n-        os.remove(fileObs)\n-        os.remove(fileExp)\n-        os.remove(tmpFileName)\n-\n-    def test_filterUnclusteredSequences(self):\n-        dClusterId2SeqHeaders = {1: ["seq1","seq2"], 2: ["seq3"]}\n-        dExp = {1: ["seq1","seq2"]}\n-        dObs = self._iLaunchBlastclust.filterUnclusteredSequences(dClusterId2SeqHeaders)\n-        self.assertEqual(dObs, dExp)\n-        \n-    def test_blastclustToMap(self):\n-        inFileName = "dummyBlastclustOut_%s.fa"  % self._uniqId\n-        inF = open(inFileName, "w")\n-        inF.write(">BlastclustCluster1Mb1_chunk1 (dbseq-nr 1) [1,14]\\n")\n-        inF.write("gaattgtttactta\\n")\n-        inF.write(">BlastclustCluster1Mb2_chunk1 (dbseq-nr 1) [30,44]\\n")\n-        inF.write("gaattgtttactta\\n")\n-        inF.write(">BlastclustCluster2Mb1_chunk2 (dbseq-nr 1) [100,114]\\n")\n-        inF.write("gaattgtttactta\\n")\n-        inF.write(">BlastclustCluster3Mb1_chunk5 (dbseq-nr 8) [1000,1014]\\n")\n-        inF.write("gaattgtttactta")\n-        inF.close()\n-        \n-        fileExp = "blastclustToMapExpected.map"\n-        outF = open(fileExp, "w")\n-        outF.write("BlastclustCluster1Mb1\\tchunk1\\t1\\t14\\n")\n-        outF.write("BlastclustCluster1Mb2\\tchunk1\\t30\\t44\\n")\n-        outF.write("BlastclustCluster2Mb1\\tchunk2\\t100\\t114\\n")\n-        outF.write("BlastclustCluster3Mb1\\tchunk5\\t1000\\t1014\\n")\n-        outF.close()\n-        \n-        self._iLaunchBlastclust.blastclustToMap(inFileName)\n-        fileObs = "%s.map" % os.path.splitext(inFileName)[0]\n-        \n-        if not FileUtils.are2FilesIdentical(fileObs, fileExp):\n-            print "Files are different"\n-            return\n-        else:\n-            print "Files are identical\\n"\n-        \n-        os.remove(inFileName)\n-        os.remove(fileObs)\n-        os.remove(fileExp)\n-\n-if __name__ == "__main__":\n-        unittest.main()\n\\ No newline at end of file\n'
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/tests/Test_LaunchTallymer.py
--- a/commons/launcher/tests/Test_LaunchTallymer.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,121 +0,0 @@
-from commons.core.utils.FileUtils import FileUtils
-import os
-import unittest
-from commons.launcher.LaunchTallymer import ConvertUtils
-
-class Test_ConvertUtils(unittest.TestCase):
-
-    def test_convertTallymerFormatIntoMapFormatAndGenerateData(self):
-        inputFastaFileName = "input.fa"
-        inputTallymerSearchFileName = "input.tallymer"
-        expMapFileName = "exp.map"
-        obsMapFileName = "obs.map"
-        self._writeInputFasta(inputFastaFileName)
-        self._writeInputTallymerSearch(inputTallymerSearchFileName)
-        self._writeExpMap(expMapFileName)
-        
-        expOccNb = 4
-        expDKmer2Occ = {"caagatgcgtaacggccata":1,
-                        "aagatgcgtaacggccatac":1,
-                        "agatgcgtaacggccataca":1,
-                        "gatgcgtaacggccatacat":1}
-        expPlotData = {4379: 17,
-                       4380: 17,
-                       4381: 16,
-                       4382: 16}
-        
-        obsOccNb, obsDKmer2Occ, obsPlotData, obsPlotData2 = ConvertUtils.convertTallymerFormatIntoMapFormatAndGenerateData(inputFastaFileName, inputTallymerSearchFileName, obsMapFileName)
-        
-        self.assertEquals(expOccNb, obsOccNb)
-        self.assertEquals(expDKmer2Occ, obsDKmer2Occ)
-        self.assertEquals(expPlotData, obsPlotData)
-        self.assertTrue(FileUtils.are2FilesIdentical(expMapFileName, obsMapFileName))
-        
-        os.remove(inputFastaFileName)
-        os.remove(inputTallymerSearchFileName)
-        os.remove(expMapFileName)
-        os.remove(obsMapFileName)
-        
-    def test_convertTallymerFormatIntoMapFormatAndGenerateDataMultiFasta(self):
-        inputFastaFileName = "input.fa"
-        inputTallymerSearchFileName = "input.tallymer"
-        expMapFileName = "exp.map"
-        obsMapFileName = "obs.map"
-        self._writeInputMultiFasta(inputFastaFileName)
-        self._writeInputTallymerSearchMultiFasta(inputTallymerSearchFileName)
-        self._writeExpMapMultiFasta(expMapFileName)
-        
-        expOccNb = 6
-        expDKmer2Occ = {"caagatgcgtaacggccata":1,
-                        "aagatgcgtaacggccatac":1,
-                        "agatgcgtaacggccataca":1,
-                        "gatgcgtaacggccatacat":1,
-                        "agatgcgtaacggccataca":2,
-                        "gatgcgtaacggccatacat":2}
-        expPlotData = {4379: 17, 4380: 17, 4381: 16, 4382: 35}
-        
-        obsOccNb, obsDKmer2Occ, obsPlotData, obsPlotData2 = ConvertUtils.convertTallymerFormatIntoMapFormatAndGenerateData(inputFastaFileName, inputTallymerSearchFileName, obsMapFileName)
-        
-        self.assertEquals(expOccNb, obsOccNb)
-        self.assertEquals(expDKmer2Occ, obsDKmer2Occ)
-        self.assertEquals(expPlotData, obsPlotData)
-        self.assertTrue(FileUtils.are2FilesIdentical(expMapFileName, obsMapFileName))
-        
-        os.remove(inputFastaFileName)
-        os.remove(inputTallymerSearchFileName)
-        os.remove(expMapFileName)
-        os.remove(obsMapFileName)
-    
-    def _writeInputTallymerSearch(self, tallymerFormatFileName):
-        with open(tallymerFormatFileName, 'w') as f:
-            f.write("0\t+4378\t17\tcaagatgcgtaacggccata\n")
-            f.write("0\t+4379\t17\taagatgcgtaacggccatac\n")
-            f.write("0\t+4380\t16\tagatgcgtaacggccataca\n")
-            f.write("0\t+4381\t16\tgatgcgtaacggccatacat\n")
-             
-    def _writeInputFasta(self, fastaFileName):
-        with open(fastaFileName, 'w') as f:
-            f.write(">Seq1\n")
-            f.write("caagatgcgtaacggccata\n")
-            f.write("aagatgcgtaacggccatac\n")
-            f.write("agatgcgtaacggccataca\n")
-            f.write("gatgcgtaacggccatacat\n")
-            
-    def _writeExpMap(self, mapFileName):
-        with open(mapFileName, 'w') as f:
-            f.write("caagatgcgtaacggccata_17\tSeq1\t4379\t4399\t17\n")
-            f.write("aagatgcgtaacggccatac_17\tSeq1\t4380\t4400\t17\n")
-            f.write("agatgcgtaacggccataca_16\tSeq1\t4381\t4401\t16\n")
-            f.write("gatgcgtaacggccatacat_16\tSeq1\t4382\t4402\t16\n")
-            
-    def _writeInputTallymerSearchMultiFasta(self, tallymerFormatFileName):
-        with open(tallymerFormatFileName, 'w') as f:
-            f.write("0\t+4378\t17\tcaagatgcgtaacggccata\n")
-            f.write("0\t+4379\t17\taagatgcgtaacggccatac\n")
-            f.write("0\t+4380\t16\tagatgcgtaacggccataca\n")
-            f.write("0\t+4381\t16\tgatgcgtaacggccatacat\n")
-            f.write("1\t+4380\t16\tagatgcgtaacggccataca\n")
-            f.write("1\t+4381\t35\tgatgcgtaacggccatacat\n")
-            
-    def _writeInputMultiFasta(self, fastaFileName):
-        with open(fastaFileName, 'w') as f:
-            f.write(">Seq1\n")
-            f.write("caagatgcgtaacggccata\n")
-            f.write("aagatgcgtaacggccatac\n")
-            f.write("agatgcgtaacggccataca\n")
-            f.write("gatgcgtaacggccatacat\n")
-            f.write(">Seq2\n")
-            f.write("agatgcgtaacggccataca\n")
-            f.write("gatgcgtaacggccatacat\n")
-            
-    def _writeExpMapMultiFasta(self, mapFileName):
-        with open(mapFileName, 'w') as f:
-            f.write("caagatgcgtaacggccata_17\tSeq1\t4379\t4399\t17\n")
-            f.write("aagatgcgtaacggccatac_17\tSeq1\t4380\t4400\t17\n")
-            f.write("agatgcgtaacggccataca_16\tSeq1\t4381\t4401\t16\n")
-            f.write("gatgcgtaacggccatacat_16\tSeq1\t4382\t4402\t16\n")
-            f.write("agatgcgtaacggccataca_16\tSeq2\t4381\t4401\t16\n")
-            f.write("gatgcgtaacggccatacat_35\tSeq2\t4382\t4402\t35\n")
-
-if __name__ == "__main__":
-    unittest.main()
\ No newline at end of file
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/tests/Test_MafftClusterLauncher.py
--- a/commons/launcher/tests/Test_MafftClusterLauncher.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,28 +0,0 @@
-import unittest
-from commons.launcher.MafftClusterLauncher import MafftClusterLauncher
-
-
-class Test_MafftClusterLauncher( unittest.TestCase ):
-    
-    def setUp( self ):
-        self._i = MafftClusterLauncher()
-        
-        
-    def tearDown( self ):
-        self._i = None
-        
-        
-    def test_getSpecificHelpAsString( self ):
-        exp = ""
-        exp += "\nspecific options:"
-        exp += "\n     -p: parameters for 'mafft' (default='--auto')"
-        obs = self._i.getSpecificHelpAsString()
-        self.assertEqual( exp, obs )
-        
-        
-    def test_setASpecificAttributeFromCmdLine( self ):
-        self._i.setASpecificAttributeFromCmdLine( "-p", "dummyPrgParam" )
-        self.assertEqual( "dummyPrgParam", self._i.getProgramParameters() )
-        
-if __name__ == "__main__":
-        unittest.main()
\ No newline at end of file
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/tests/Test_MafftProgramLauncher.py
--- a/commons/launcher/tests/Test_MafftProgramLauncher.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,105 +0,0 @@
-import unittest
-from commons.launcher.MafftProgramLauncher import MafftProgramLauncher
-
-class Test_MafftProgramLauncher( unittest.TestCase ):
-    
-    
-    def setUp( self ):
-        self._i = MafftProgramLauncher()
-        
-        
-    def tearDown( self ):
-        self._i = None
-        
-        
-    def test_getSpecificHelpAsString( self ):
-        exp = ""
-        exp += "\nspecific options:"
-        exp += "\n     -p: parameters for '%s' (default='--auto')" % ( "mafft" )
-        exp += "\n     -o: name of the output file (format='aligned fasta', default=inFile+'.fa_aln')"
-        obs = self._i.getSpecificHelpAsString()
-        self.assertEqual( exp, obs )
-        
-        
-    def test_setASpecificAttributeFromCmdLine( self ):
-        self._i.setASpecificAttributeFromCmdLine( "-p", "'--auto --maxiterate 500'" )
-        self.assertEqual( "'--auto --maxiterate 500'", self._i.getProgramParameters() )
-        
-        self._i.setASpecificAttributeFromCmdLine( "-o", "dummyOutFile.fa_aln" )
-        self.assertEqual( "dummyOutFile.fa_aln", self._i.getOutputFile() )
-        
-        
-    def test_setWrapperCommandLine( self ):
-        inFile = "dummyInFile.fa"
-        self._i.setInputFile( inFile )
-        exp = "MafftProgramLauncher.py"
-        exp += " -i %s" % ( inFile )
-        exp += " -p '%s'" % ( "--auto" )
-        exp += " -o %s.fa_aln" % ( inFile )
-        exp += " -v 0"
-        self._i.setWrapperCommandLine()
-        obs = self._i.getWrapperCommandLine()
-        self.assertEqual( exp, obs )
-        
-        
-    def test_setProgramCommandLine( self ):
-        inFile = "dummyInFile.fa"
-        self._i.setInputFile( inFile )
-        exp = self._i.getProgramName()
-        exp += " %s" % ( "--auto" )
-        exp += " --quiet"
-        exp += " %s.shortH" % ( inFile )
-        exp += " > %s.shortH.fa_aln" % ( inFile )
-        exp += " 2> /dev/null"
-        self._i.setProgramCommandLine()
-        obs = self._i.getProgramCommandLine()
-        self.assertEqual( exp, obs )
-        
-        
-    def test_setListFilesToKeep( self ):
-        inFile = "dummyInFile.fa"
-        self._i.setInputFile( inFile )
-        self._i.setListFilesToKeep()
-        lExp = [ "dummyInFile.fa.fa_aln" ]
-        lObs = self._i.getListFilesToKeep()
-        lExp.sort()
-        lObs.sort()
-        self.assertEqual( lExp, lObs )
-        
-        self._i._lFilesToKeep = []
-        
-        outFile = "dummyOutFile.fa_aln"
-        self._i.setOutputFile( outFile )
-        self._i.setListFilesToKeep()
-        lExp = [ outFile ]
-        lObs = self._i.getListFilesToKeep()
-        lExp.sort()
-        lObs.sort()
-        self.assertEqual( lExp, lObs )
-        
-        
-    def test_setListFilesToRemove( self ):
-        inFile = "dummyInFile.fa"
-        self._i.setInputFile( inFile )
-        self._i.setListFilesToRemove()
-        lExp = [ "dummyInFile.fa.shortH", \
-                 "dummyInFile.fa.shortH.fa_aln", \
-                 "dummyInFile.fa.shortHlink" ]
-        lObs = self._i.getListFilesToRemove()
-        lExp.sort()
-        lObs.sort()
-        self.assertEqual( lExp, lObs )
-        
-        
-    def test_setSummary( self ):
-        self._i.setInputFile( "dummyInFile.fa" )
-        exp = "input file: %s" % ( "dummyInFile.fa" )
-        exp += "\nparameters: %s" % ( "--auto" )
-        exp += "\noutput file: %s" % ( "dummyInFile.fa.fa_aln" )
-        self._i.setSummary()
-        obs = self._i.getSummary()
-        self.assertEqual( exp, obs )
-        
-        
-if __name__ == "__main__":
-        unittest.main()
\ No newline at end of file
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/tests/Test_MapClusterLauncher.py
--- a/commons/launcher/tests/Test_MapClusterLauncher.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,41 +0,0 @@
-import unittest
-from commons.launcher.MapClusterLauncher import MapClusterLauncher
-
-
-class Test_MapClusterLauncher( unittest.TestCase ):
-    
-    
-    def setUp( self ):
-        self._i = MapClusterLauncher()
-        
-        
-    def tearDown( self ):
-        self._i = None
-        
-        
-    def test_getSpecificHelpAsString( self ):
-        exp = ""
-        exp += "\nspecific options:"
-        exp += "\n     -s: size above which a gap is not penalized anymore (default='%i')" % ( self._i.getGapSize() )
-        exp += "\n     -m: penalty for a mismatch (default='%i')" % ( self._i.getMismatchPenalty() )
-        exp += "\n     -O: penalty for a gap openning (default='%i')" % ( self._i.getGapOpenPenalty() )
-        exp += "\n     -e: penalty for a gap extension (default='%i')" % ( self._i.getGapExtendPenalty() )
-        obs = self._i.getSpecificHelpAsString()
-        self.assertEqual( exp, obs )
-        
-        
-    def test_setASpecificAttributeFromCmdLine( self ):
-        self._i.setASpecificAttributeFromCmdLine( "-s", "42" )
-        self.assertEqual( 42, self._i.getGapSize() )
-        
-        self._i.setASpecificAttributeFromCmdLine( "-m", "-7" )
-        self.assertEqual( -7, self._i.getMismatchPenalty() )
-        
-        self._i.setASpecificAttributeFromCmdLine( "-O", "15" )
-        self.assertEqual( 15, self._i.getGapOpenPenalty() )
-        
-        self._i.setASpecificAttributeFromCmdLine( "-e", "5" )
-        self.assertEqual( 5, self._i.getGapExtendPenalty() )
-        
-if __name__ == "__main__":
-        unittest.main()
\ No newline at end of file
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/tests/Test_MapProgramLauncher.py
--- a/commons/launcher/tests/Test_MapProgramLauncher.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,115 +0,0 @@
-import unittest
-from commons.launcher.MapProgramLauncher import MapProgramLauncher
-
-class Test_MapProgramLauncher( unittest.TestCase ):
-    
-    def setUp( self ):
-        self._i = MapProgramLauncher()
-        
-    def tearDown( self ):
-        self._i = None
-        
-    def test_getSpecificHelpAsString( self ):
-        exp = ""
-        exp += "\nspecific options:"
-        exp += "\n     -s: size above which a gap is not penalized anymore (default='%i')" % ( self._i.getGapSize() )
-        exp += "\n     -m: penalty for a mismatch (default='%i', match=10)" % ( self._i.getMismatchPenalty() )
-        exp += "\n     -O: penalty for a gap opening (default='%i')" % (  self._i.getGapOpenPenalty())
-        exp += "\n     -e: penalty for a gap extension (default='%i')" % ( self._i.getGapExtendPenalty() )
-        exp += "\n     -o: name of the output file (format='aligned fasta', default=inFile+'.fa_aln')"
-        obs = self._i.getSpecificHelpAsString()
-        self.assertEqual( exp, obs )
-        
-    def test_setASpecificAttributeFromCmdLine( self ):
-        self._i.setASpecificAttributeFromCmdLine( "-s", "40" )
-        self.assertEqual( 40, self._i.getGapSize() )
-        
-        self._i.setASpecificAttributeFromCmdLine( "-m", "-7" )
-        self.assertEqual( -7, self._i.getMismatchPenalty() )
-        
-        self._i.setASpecificAttributeFromCmdLine( "-O", "15" )
-        self.assertEqual( 15, self._i.getGapOpenPenalty() )
-        
-        self._i.setASpecificAttributeFromCmdLine( "-e", "5" )
-        self.assertEqual( 5, self._i.getGapExtendPenalty() )
-        
-        self._i.setASpecificAttributeFromCmdLine( "-o", "dummyOutFile.fa_aln" )
-        self.assertEqual( "dummyOutFile.fa_aln", self._i.getOutputFile() )
-        
-    def test_setWrapperCommandLine( self ):
-        inFile = "dummyInFile.fa"
-        self._i.setInputFile( inFile )
-        exp = "MapProgramLauncher.py"
-        exp += " -i %s" % ( inFile )
-        exp += " -s 50"
-        exp += " -m -8"
-        exp += " -O 16"
-        exp += " -e 4"
-        exp += " -o %s.fa_aln" % ( inFile )
-        exp += " -v 0"
-        self._i.setWrapperCommandLine()
-        obs = self._i.getWrapperCommandLine()
-        self.assertEqual( exp, obs )
-        
-    def test_setProgramCommandLine( self ):
-        inFile = "dummyInFile.fa"
-        self._i.setInputFile( inFile )
-        exp = self._i.getProgramName()
-        exp += " %s.shortH" % ( inFile )
-        exp += " 50"
-        exp += " -8"
-        exp += " 16"
-        exp += " 4"
-        exp += " > %s.shortH.fa_aln" % ( inFile )
-        self._i.setProgramCommandLine()
-        obs = self._i.getProgramCommandLine()
-        self.assertEqual( exp, obs )
-        
-    def test_setListFilesToKeep( self ):
-        inFile = "dummyInFile.fa"
-        self._i.setInputFile( inFile )
-        self._i.setListFilesToKeep()
-        lExp = [ "dummyInFile.fa.fa_aln" ]
-        lObs = self._i.getListFilesToKeep()
-        lExp.sort()
-        lObs.sort()
-        self.assertEqual( lExp, lObs )
-        
-        self._i._lFilesToKeep = []
-        
-        outFile = "dummyOutFile.fa_aln"
-        self._i.setOutputFile( outFile )
-        self._i.setListFilesToKeep()
-        lExp = [ outFile ]
-        lObs = self._i.getListFilesToKeep()
-        lExp.sort()
-        lObs.sort()
-        self.assertEqual( lExp, lObs )
-        
-    def test_getListFilesToRemove( self ):
-        inFile = "dummyInFile.fa"
-        self._i.setInputFile( inFile )
-        self._i.setListFilesToRemove()
-        lExp = [ "dummyInFile.fa.shortH", \
-                 "dummyInFile.fa.shortH.fa_aln", \
-                 "dummyInFile.fa.shortHlink" ]
-        lObs = self._i.getListFilesToRemove()
-        lExp.sort()
-        lObs.sort()
-        self.assertEqual( lExp, lObs )
-        
-    def test_setSummary( self ):
-        self._i.setInputFile( "dummyInFile.fa" )
-        self._i.setGapSize( 104 )
-        exp = "input file: %s" % ( "dummyInFile.fa" )
-        exp += "\ngap size: %i" % ( self._i.getGapSize() )
-        exp += "\nmismatch penalty: %i" % ( self._i.getMismatchPenalty() )
-        exp += "\ngap openning penalty: %i" % ( self._i.getGapOpenPenalty() )
-        exp += "\ngap extension penalty: %i" % ( self._i.getGapExtendPenalty() )
-        exp += "\noutput file: %s" % ( "dummyInFile.fa.fa_aln" )
-        self._i.setSummary()
-        obs = self._i.getSummary()
-        self.assertEqual( exp, obs )
-
-if __name__ == "__main__":
-        unittest.main()
\ No newline at end of file
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/tests/Test_NWalignProgramLauncher.py
--- a/commons/launcher/tests/Test_NWalignProgramLauncher.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,78 +0,0 @@
-import unittest
-from commons.launcher.NWalignProgramLauncher import NWalignProgramLauncher
-
-
-class Test_NWalignProgramLauncher( unittest.TestCase ):
-    
-    def setUp( self ):
-        self._i = NWalignProgramLauncher()
-        
-        
-    def tearDown( self ):
-        self._i = None
-        
-        
-    def test_getSpecificHelpAsString( self ):
-        exp = ""
-        exp += "\nspecific options:"
-        exp += "\n     -s: name of the subject file (format='fasta')"
-        exp += "\n     -p: parameters for 'NWalign'"
-        exp += "\n     -o: name of the output file (format='align', default=inFile+'.align')"
-        obs = self._i.getSpecificHelpAsString()
-        self.assertEqual( exp, obs )
-        
-        
-    def test_setASpecificAttributeFromCmdLine( self ):
-        self._i.setASpecificAttributeFromCmdLine( "-s", "dummySubjectFile.fa" )
-        self.assertEqual( "dummySubjectFile.fa", self._i.getSubjectFile() )
-        
-        self._i.setASpecificAttributeFromCmdLine( "-o", "dummyOutFile.align" )
-        self.assertEqual( "dummyOutFile.align", self._i.getOutputFile() )
-        
-        
-    def test_setWrapperCommandLine( self ):
-        self._i.setInputFile( "dummyInFile.fa" )
-        self._i.setSubjectFile( "dummySubjectFile.fa" )
-        exp = "NWalignProgramLauncher.py"
-        exp += " -i %s" % ( "dummyInFile.fa" )
-        exp += " -s %s" % ( "dummySubjectFile.fa" )
-        exp += " -o %s.align" % ( "dummyInFile.fa" )
-        exp += " -v 0"
-        self._i.setWrapperCommandLine()
-        obs = self._i.getWrapperCommandLine()
-        self.assertEqual( exp, obs )
-        
-        
-    def test_setProgramCommandLine( self ):
-        self._i.setInputFile( "dummyInFile.fa" )
-        self._i.setSubjectFile( "dummySubjectFile.fa" )
-        self._i.setProgramParameters( "-m 2" )
-        exp = "NWalign -m 2 -o dummyInFile.fa.afa -v 0 dummySubjectFile.fa dummyInFile.fa"
-        self._i.setProgramCommandLine()
-        obs = self._i.getProgramCommandLine()
-        self.assertEqual( exp, obs )
-        
-        
-    def test_setListFilesToKeep( self ):
-        self._i.setInputFile( "dummyInFile.fa" )
-        lExp = [ "dummyInFile.fa.afa" ]
-        self._i.setListFilesToKeep()
-        lObs = self._i.getListFilesToKeep()
-        lExp.sort()
-        lObs.sort()
-        self.assertEqual( lExp, lObs )
-        
-        
-    def test_setSummary( self ):
-        self._i.setInputFile( "dummyInFile.fa" )
-        self._i.setSubjectFile( "dummySubjectFile.fa" )
-        exp = "input file: %s" % ( self._i.getInputFile() )
-        exp += "\nsubject file: %s" % ( self._i.getSubjectFile() )
-        exp += "\nparameters: %s" % ( self._i.getProgramParameters() )
-        exp += "\noutput file: %s" % ( "dummyInFile.fa.align" )
-        self._i.setSummary()
-        obs = self._i.getSummary()
-        self.assertEqual( exp, obs )
-        
-if __name__ == "__main__":
-        unittest.main()
\ No newline at end of file
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/tests/Test_RepeatMaskerClusterLauncher.py
--- a/commons/launcher/tests/Test_RepeatMaskerClusterLauncher.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,45 +0,0 @@
-import unittest
-from commons.launcher.RepeatMaskerClusterLauncher import RepeatMaskerClusterLauncher
-
-
-class Test_RepeatmaskerClusterLauncher( unittest.TestCase ):
-    
-    
-    def setUp( self ):
-        self._i = RepeatMaskerClusterLauncher()
-        
-        
-    def tearDown( self ):
-        self._i = None
-        
-        
-    def test_getSpecificHelpAsString( self ):
-        exp = ""
-        exp += "\nspecific options:"
-        exp += "\n     -s: name of the subject file (repeats, format='fasta')"
-        exp += "\n     -n: nb of processors to use in parallel (default=1)"
-        exp += "\n     -g: calculate the GC content"
-        exp += "\n     -b: skip bacterial insertion element check"
-        exp += "\n     -l: mask low-complexity DNA or simple repeats"
-        obs = self._i.getSpecificHelpAsString()
-        self.assertEqual( exp, obs )
-        
-        
-    def test_setASpecificAttributeFromCmdLine( self ):
-        self._i.setASpecificAttributeFromCmdLine( "-s", "dummySubjectFile.fa" )
-        self.assertEqual( "dummySubjectFile.fa", self._i.getSubjectFile() )
-        
-        self._i.setASpecificAttributeFromCmdLine( "-n", "2" )
-        self.assertEqual( 2, self._i.getNbProcessors() )
-        
-        self._i.setASpecificAttributeFromCmdLine( "-g" )
-        self.assertTrue( self._i.getCalculateGCcontent() )
-        
-        self._i.setASpecificAttributeFromCmdLine( "-b" )
-        self.assertTrue( self._i.getSkipBacterialIsCheck() )
-
-        self._i.setASpecificAttributeFromCmdLine( "-l" )
-        self.assertFalse( self._i.getMaskSsr() )
-        
-if __name__ == "__main__":
-        unittest.main()
\ No newline at end of file
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/tests/Test_RepeatMaskerProgramLauncher.py
--- a/commons/launcher/tests/Test_RepeatMaskerProgramLauncher.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,171 +0,0 @@
-import unittest
-from commons.launcher.RepeatMaskerProgramLauncher import RepeatMaskerProgramLauncher
-
-
-class Test_RepeatMaskerProgramLauncher( unittest.TestCase ):
-    
-    def setUp( self ):
-        self._i = RepeatMaskerProgramLauncher()
-        
-        
-    def tearDown( self ):
-        self._i = None
-        
-        
-    def test_getSpecificHelpAsString( self ):
-        exp = ""
-        exp += "\nspecific options:"
-        exp += "\n     -s: name of the subject file (repeats, format='fasta')"
-        exp += "\n     -n: nb of processors to use in parallel (default='%i')" % ( self._i.getNbProcessors() )
-        exp += "\n     -g: calculate the GC content"
-        exp += "\n     -b: skip bacterial insertion element check"
-        exp += "\n     -l: does not mask low-complexity DNA or simple repeats"
-        exp += "\n     -m: only masks low complex/simple repeats (no interspersed repeats)"
-        exp += "\n     -o: name of the output file"
-        exp += "\n         with -s: format='align', default=inFile+'.cat.align')"
-        exp += "\n         with -m: format='path', default=inFile+'.cat.path')"
-        obs = self._i.getSpecificHelpAsString()
-        self.assertEqual( exp, obs )
-        
-        
-    def test_setASpecificAttributeFromCmdLine( self ):
-        self._i.setASpecificAttributeFromCmdLine( "-s", "dummySubjectFile.fa" )
-        self.assertEqual( "dummySubjectFile.fa", self._i.getSubjectFile() )
-        
-        self._i.setASpecificAttributeFromCmdLine( "-n", "2" )
-        self.assertEqual( 2, self._i.getNbProcessors() )
-        
-        self._i.setASpecificAttributeFromCmdLine( "-g" )
-        self.assertEqual( True, self._i.getCalculateGCcontent() )
-        
-        self._i.setASpecificAttributeFromCmdLine( "-b" )
-        self.assertEqual( True, self._i.getSkipBacterialIsCheck() )
-        
-        self._i.setASpecificAttributeFromCmdLine( "-l" )
-        self.assertEqual( False, self._i.getMaskSsr() )
-        
-        self._i.setASpecificAttributeFromCmdLine( "-o", "dummyOutFile.align" )
-        self.assertEqual( "dummyOutFile.align", self._i.getOutputFile() )
-        
-        
-    def test_setWrapperCommandLine( self ):
-        self._i.setInputFile( "dummyInFile.fa" )
-        self._i.setSubjectFile( "dummySubjectFile.fa" )
-        exp = "RepeatMaskerProgramLauncher.py"
-        exp += " -i %s" % ( "dummyInFile.fa" )
-        exp += " -s %s" % ( "dummySubjectFile.fa" )
-        exp += " -n 1"
-        self._i.setWrapperCommandLine()
-        obs = self._i.getWrapperCommandLine()
-        self.assertEqual( exp, obs )
-        
-        
-    def test_setProgramCommandLine( self ):
-        self._i.setInputFile( "dummyInFile.fa" )
-        self._i.setSubjectFile( "dummySubjectFile.fa" )
-        self._i.setCalculateGCcontent()
-        self._i.setSkipBacterialIsCheck()
-        exp = "RepeatMasker -dir . -pa 1 -gccalc -no_is -nolow -lib dummySubjectFile.fa dummyInFile.fa"
-        self._i.setProgramCommandLine()
-        obs = self._i.getProgramCommandLine()
-        self.assertEqual( exp, obs )
-        
-        
-    def test_setProgramCommandLine_withoutSubjects_withMaskSsr( self ):
-        self._i.setInputFile( "dummyInFile.fa" )
-        self._i.setCalculateGCcontent()
-        self._i.setSkipBacterialIsCheck()
-        exp = "RepeatMasker -dir . -pa 1 -gccalc -no_is -nolow dummyInFile.fa"
-        self._i.setProgramCommandLine()
-        obs = self._i.getProgramCommandLine()
-        self.assertEqual( exp, obs )
-        
-        
-    def test_setListFilesToKeep_onlyInFile( self ):
-        self._i.setInputFile( "dummyInFile.fa" )
-        self._i.setOnlySsr()
-        lExp = [ "dummyInFile.fa.cat", "dummyInFile.fa.cat.path" ]
-        self._i.setListFilesToKeep()
-        lObs = self._i.getListFilesToKeep()
-        lExp.sort()
-        lObs.sort()
-        self.assertEqual( lExp, lObs )
-        
-        
-    def test_setListFilesToKeep_withSubjectFile( self ):
-        self._i.setInputFile( "dummyInFile.fa" )
-        self._i.setSubjectFile( "dummySbjFile.fa" )
-        lExp = [ "dummyInFile.fa.cat", "dummyInFile.fa.cat.align" ]
-        self._i.setListFilesToKeep()
-        lObs = self._i.getListFilesToKeep()
-        lExp.sort()
-        lObs.sort()
-        self.assertEqual( lExp, lObs )
-        
-        
-    def test_setListFilesToKeep_inFileAndOutFile( self ):
-        self._i.setInputFile( "dummyInFile.fa" )
-        self._i.setOutputFile( "dummyOutFile.align" )
-        lExp = [ "dummyInFile.fa.cat", "dummyOutFile.align" ]
-        self._i.setListFilesToKeep()
-        lObs = self._i.getListFilesToKeep()
-        lExp.sort()
-        lObs.sort()
-        self.assertEqual( lExp, lObs )
-        
-        
-    def test_setListFilesToKeep_inFileAndOutFileAndSsr( self ):
-        self._i.setInputFile( "dummyInFile.fa" )
-        self._i.unsetMaskSsr()
-        self._i.setOutputFile( "dummyOutFile.path" )
-        lExp = [ "dummyInFile.fa.cat", "dummyOutFile.path" ]
-        self._i.setListFilesToKeep()
-        lObs = self._i.getListFilesToKeep()
-        lExp.sort()
-        lObs.sort()
-        self.assertEqual( lExp, lObs )
-        
-        
-    def test_setListFilesToRemove( self ):
-        self._i.setInputFile( "dummyInFile.fa" )
-        lExp = [ "dummyInFile.fa.out", \
-                 "dummyInFile.fa.log", \
-                 "dummyInFile.fa.stderr", \
-                 "dummyInFile.fa.ori.out", \
-                 "dummyInFile.fa.masked", \
-                 "dummyInFile.fa.tbl", \
-                 "dummyInFile.fa.ref" ]
-        self._i.setListFilesToRemove()
-        lObs = self._i.getListFilesToRemove()
-        lExp.sort()
-        lObs.sort()
-        self.assertEqual( lExp, lObs )
-        
-        
-    def test_setSummary( self ):
-        self._i.setInputFile( "dummyInFile.fa" )
-        self._i.setSubjectFile( "dummySubjectFile.fa" )
-        exp = "input file: %s" % ( self._i.getInputFile() )
-        exp += "\nsubject file: %s" % ( self._i.getSubjectFile() )
-        exp += "\nnb processors: %i" % ( self._i.getNbProcessors() )
-        exp += "\nmask low-complexity DNA or simple repeats"
-        exp += "\noutput file: %s" % ( "dummyInFile.fa.cat.path" )
-        self._i.setSummary()
-        obs = self._i.getSummary()
-        self.assertEqual( exp, obs )
-        
-        
-    def test_setSummary_noMaskSsr( self ):
-        self._i.setInputFile( "dummyInFile.fa" )
-        self._i.setSubjectFile( "dummySubjectFile.fa" )
-        self._i.unsetMaskSsr()
-        exp = "input file: %s" % ( self._i.getInputFile() )
-        exp += "\nsubject file: %s" % ( self._i.getSubjectFile() )
-        exp += "\nnb processors: %i" % ( self._i.getNbProcessors() )
-        exp += "\noutput file: %s" % ( "dummyInFile.fa.cat.align" )
-        self._i.setSummary()
-        obs = self._i.getSummary()
-        self.assertEqual( exp, obs )
-        
-if __name__ == "__main__":
-        unittest.main()
\ No newline at end of file
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/tests/Test_YassClusterLauncher.py
--- a/commons/launcher/tests/Test_YassClusterLauncher.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,30 +0,0 @@
-import unittest
-from commons.launcher.YassClusterLauncher import YassClusterLauncher
-
-class Test_YassClusterLauncher( unittest.TestCase ):
-    
-    def setUp( self ):
-        self._i = YassClusterLauncher()
-        
-        
-    def tearDown( self ):
-        self._i = None
-        
-        
-    def test_getSpecificHelpAsString( self ):
-        exp = ""
-        exp += "\nspecific options:"
-        exp += "\n     -s: name of the subject file (format='fasta')"
-        exp += "\n     -p: parameters for 'yass'"
-        exp += "\n     -Z: concatenate output files"
-        exp += "\n     -A: same sequences (all-by-all)"
-        obs = self._i.getSpecificHelpAsString()
-        self.assertEqual( exp, obs )
-        
-        
-    def test_setASpecificAttributeFromCmdLine( self ):
-        self._i.setASpecificAttributeFromCmdLine( "-s", "dummySubjectFile.fa" )
-        self.assertEqual( "dummySubjectFile.fa", self._i.getSubjectFile() )
-        
-if __name__ == "__main__":
-        unittest.main()
\ No newline at end of file
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/tests/Test_YassProgramLauncher.py
--- a/commons/launcher/tests/Test_YassProgramLauncher.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,79 +0,0 @@
-import unittest
-from commons.launcher.YassProgramLauncher import YassProgramLauncher
-
-
-
-class Test_YassProgramLauncher( unittest.TestCase ):
-    
-    def setUp( self ):
-        self._i = YassProgramLauncher()
-        
-        
-    def tearDown( self ):
-        self._i = None
-        
-        
-    def test_getSpecificHelpAsString( self ):
-        exp = ""
-        exp += "\nspecific options:"
-        exp += "\n     -s: name of the subject file (format='fasta')"
-        exp += "\n     -p: parameters for 'yass'"
-        exp += "\n     -A: same sequences (all-by-all)"
-        exp += "\n     -o: name of the output file (format='align', default=inFile+'.align')"
-        obs = self._i.getSpecificHelpAsString()
-        self.assertEqual( exp, obs )
-        
-        
-    def test_setASpecificAttributeFromCmdLine( self ):
-        self._i.setASpecificAttributeFromCmdLine( "-s", "dummySubjectFile.fa" )
-        self.assertEqual( "dummySubjectFile.fa", self._i.getSubjectFile() )
-        
-        self._i.setASpecificAttributeFromCmdLine( "-o", "dummyOutFile.align" )
-        self.assertEqual( "dummyOutFile.align", self._i.getOutputFile() )
-        
-        
-    def test_setWrapperCommandLine( self ):
-        self._i.setInputFile( "dummyInFile.fa" )
-        self._i.setSubjectFile( "dummySubjectFile.fa" )
-        exp = "YassProgramLauncher.py"
-        exp += " -i %s" % ( "dummyInFile.fa" )
-        exp += " -s %s" % ( "dummySubjectFile.fa" )
-        exp += " -o %s.align" % ( "dummyInFile.fa" )
-        exp += " -v 0"
-        self._i.setWrapperCommandLine()
-        obs = self._i.getWrapperCommandLine()
-        self.assertEqual( exp, obs )
-        
-        
-    def test_setProgramCommandLine( self ):
-        self._i.setInputFile( "dummyInFile.fa" )
-        self._i.setSubjectFile( "dummySubjectFile.fa" )
-        exp = "yass -d 2 -o dummyInFile.fa.blast dummyInFile.fa dummySubjectFile.fa"
-        self._i.setProgramCommandLine()
-        obs = self._i.getProgramCommandLine()
-        self.assertEqual( exp, obs )
-        
-        
-    def test_setListFilesToKeep( self ):
-        self._i.setInputFile( "dummyInFile.fa" )
-        lExp = [ "dummyInFile.fa.align" ]
-        self._i.setListFilesToKeep()
-        lObs = self._i.getListFilesToKeep()
-        lExp.sort()
-        lObs.sort()
-        self.assertEqual( lExp, lObs )
-        
-        
-    def test_setSummary( self ):
-        self._i.setInputFile( "dummyInFile.fa" )
-        self._i.setSubjectFile( "dummySubjectFile.fa" )
-        exp = "input file: %s" % ( self._i.getInputFile() )
-        exp += "\nsubject file: %s" % ( self._i.getSubjectFile() )
-        exp += "\nparameters: %s" % ( self._i.getProgramParameters() )
-        exp += "\noutput file: %s" % ( "dummyInFile.fa.align" )
-        self._i.setSummary()
-        obs = self._i.getSummary()
-        self.assertEqual( exp, obs )
-         
-if __name__ == "__main__":
-        unittest.main()
\ No newline at end of file
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/launcher/tests/Test_launchTEclass.py
--- a/commons/launcher/tests/Test_launchTEclass.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,34 +0,0 @@
-import unittest
-import os
-from commons.core.utils.FileUtils import FileUtils
-from commons.launcher import launchTEclass
-
-
-class Test_launchTEclass( unittest.TestCase ):
-    
-    def test_parseFastaFileFromTEclass( self ):
-        inFile = "dummyLibFile.fa"
-        inHandler = open( inFile, "w" )
-        inHandler.write( ">1360|TEclass result: DNA|ORFs: 1360..2226:+1\n" )
-        inHandler.write( "AGCATGACGCA\n" )
-        inHandler.write( ">FB|TEclass result: unclear\n" )
-        inHandler.write( "GCATGCAGCGACGCGAC\n" )
-        inHandler.close()
-        
-        expFile = "dummyExpFile.map"
-        expHandler = open( expFile, "w" )
-        expHandler.write( "DNA\t1360\t1\t11\n" )
-        expHandler.write( "unclear\tFB\t1\t17\n" )
-        expHandler.close()
-        
-        obsFile = "dummyObsFile.map"
-        
-        launchTEclass.parseFastaFileFromTEclass( inFile, obsFile )
-        
-        self.assertTrue( FileUtils.are2FilesIdentical( expFile, obsFile ) )
-        
-        for f in [ inFile, expFile, obsFile ]:
-            os.remove( f )
-
-if __name__ == "__main__":
-        unittest.main()
\ No newline at end of file
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/pyRepetUnit/align/AlignList.py
--- a/commons/pyRepetUnit/align/AlignList.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,51 +0,0 @@
-## class of list of align object
-#
-class AlignList:
-
-    list;
-    
-    def __init__( self ):
-        self.list = []
-
-    ## append align instance in the align instance list
-    #
-    # @param AlignInstance instance of align object
-    #
-    def append(self, AlignInstance):
-        self.list.append(AlignInstance)
-       
-    ## get length of list of align instance
-    #
-    #@return length integer length of list
-    #
-    def len(self):
-        return len(self.list)   
-    
-    ## get list of align instance
-    #
-    #@return list of align instance
-    #
-    def getList(self):
-        return self.list
-    
-    ## get item in list of align instance according to index
-    #
-    #@param index integer index of list
-    #@return align instance item of list of align instance
-    #
-    def get(self, index):
-        return self.list[index]
-    
-    ## extend align instance in the align instance list
-    #
-    # @param AlignInstance instance of align object
-    #
-    def extend(self, AlignInstance):
-        self.list.extend(AlignInstance)
-        
-    ## take off an align instance from the align instance list
-    #
-    # @param AlignInstance instance of align object
-    #
-    def remove(self, AlignInstance):
-       self.list.remove(AlignInstance)
\ No newline at end of file
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/pyRepetUnit/align/AlignListUtils.py
--- a/commons/pyRepetUnit/align/AlignListUtils.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,53 +0,0 @@
-import os
-import commons.core.coord.Align
-import commons.pyRepetUnit.align.AlignList
-from commons.core.utils.FileUtils import FileUtils
-
-class AlignListUtils:  
-  
-    ##read a file in align format and return a AlignList
-    #
-    # @param inFileName string name of file
-    # @return listAlignInstance list list of align instance
-    #
-    def read( inFileName ):
-        alignInstance = commons.core.coord.Align.Align() 
-        listAlignInstance = commons.pyRepetUnit.align.AlignList.AlignList()
-        f = open( inFileName , "r")
-        while alignInstance.read( f ):
-            listAlignInstance.append(alignInstance)
-            alignInstance = commons.core.coord.Align.Align()
-        f.close
-        return (listAlignInstance)
-    
-    read = staticmethod( read )
-    
-    ## write a file in align format from an AlignList
-    #
-    # @param alignListInstance list list of align instance object
-    # @param  inFileName string name of file
-    def write( alignListInstance, inFileName ):
-        f = open( inFileName , "w")
-        for alignInstance in alignListInstance.getList():
-            alignInstance.write( f )
-        f.close
-        
-    write = staticmethod( write )
-    
-    ## Filter an AlignList by removing all is <= minScore
-    #
-    # @param listAlignInstance list list of align instance object
-    # @param minScore integer minimum score to keep in result
-    # 
-    def filterOnAMinimalScore( listAlignInstance, minScore ):
-        listAlignInstanceOld = commons.pyRepetUnit.align.AlignList.AlignList() 
-        for alignInstance in listAlignInstance.getList():  
-            listAlignInstanceOld.append(alignInstance)
-        for alignInstance in listAlignInstanceOld.getList():
-            if alignInstance.score <= minScore:
-                listAlignInstance.remove(alignInstance)
-        
-    filterOnAMinimalScore = staticmethod( filterOnAMinimalScore )    
-    
-if __name__ == "__main__":                 
-    main() 
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/pyRepetUnit/align/hmmOutputParsing/HmmpfamOutput2align.py
--- a/commons/pyRepetUnit/align/hmmOutputParsing/HmmpfamOutput2align.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,32 +0,0 @@
-from commons.pyRepetUnit.hmmer.hmmOutput.HmmpfamOutputProcessing import HmmpfamOutputProcessing
-
-##data processor : read an output from hmmpfam and transform it into .align file
-#    
-class HmmpfamOutput2align( object ):
-
-    ## constructor
-    #
-    def __init__(self):
-        self.hmmpfamOutputProcess = HmmpfamOutputProcessing()
-        self._inputFile = "" 
-        self._outputFile =  ""    
-    
-    ## set input file
-    #
-    # @param input file input file
-    #    
-    def setInputFile(self, input):
-        self._inputFile = input
-    
-    ## set output file
-    #
-    # @param output file output file
-    #         
-    def setOutputFile(self, output):
-        self._outputFile = output   
-    
-    
-    ##read a hmmpfam output file, parse it and, write the corresponding .align file
-    #
-    def run( self ):
-        self.hmmpfamOutputProcess.readHmmOutputsAndWriteAlignFile( self._inputFile, self._outputFile )
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/pyRepetUnit/align/hmmOutputParsing/HmmscanOutput2align.py
--- a/commons/pyRepetUnit/align/hmmOutputParsing/HmmscanOutput2align.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,28 +0,0 @@
-from commons.pyRepetUnit.hmmer.hmmOutput.HmmscanOutputProcessing import HmmscanOutputProcessing
-##data processor : read an output from hmmscan and transform it into .align file
-#
-class HmmscanOutput2align( object ):
-    
-    ## constructor
-    #
-    def __init__(self):
-        self.hmmscanOutputProcess = HmmscanOutputProcessing()
-        self._inputFile = "" 
-        self._outputFile =  ""    
-     
-    ## set input file
-    #
-    # @param input file input file
-    #    
-    def setInputFile(self, input):
-        self._inputFile = input
-    ## set output file
-    # @param output file output file
-    #     
-    def setOutputFile(self, output):
-        self._outputFile = output   
-    
-    ##read a hmmscan output file, parse it and, write the corresponding .align file
-    #    
-    def run( self ):
-        self.hmmscanOutputProcess.readHmmOutputsAndWriteAlignFile( self._inputFile, self._outputFile )
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/pyRepetUnit/align/hmmOutputParsing/tests/HmmpfamOutput2AlignTestSuite.py
--- a/commons/pyRepetUnit/align/hmmOutputParsing/tests/HmmpfamOutput2AlignTestSuite.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,21 +0,0 @@
-import unittest
-import sys
-from Test_F_HmmpfamOutput2align import Test_F_HmmpfamOutput2align
-from Test_F_HmmscanOutput2align import Test_F_HmmscanOutput2align
-from Test_F_Hmmerpfam2align import Test_F_Hmmerpfam2align
-from commons.tools.tests.Test_F_HmmOutput2alignAndTransformCoordInNtAndFilterScores_script import Test_F_HmmOutput2alignAndTransformCoordInNtAndFilterScores_script
-
-def main():
-
-        hmmerTestSuite = unittest.TestSuite() 
-        hmmerTestSuite.addTest(unittest.makeSuite(Test_F_HmmpfamOutput2align,'test'))
-        hmmerTestSuite.addTest(unittest.makeSuite(Test_F_HmmscanOutput2align,'test'))
-        hmmerTestSuite.addTest(unittest.makeSuite(Test_F_HmmOutput2alignAndTransformCoordInNtAndFilterScores_script,'test'))
-        hmmerTestSuite.addTest(unittest.makeSuite(Test_F_Hmmerpfam2align,'test'))
-        
-        runner = unittest.TextTestRunner(sys.stderr, 2, 2)
-        runner.run(hmmerTestSuite)
-
-
-if __name__ == '__main__':
-    main()
\ No newline at end of file
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/pyRepetUnit/align/hmmOutputParsing/tests/Test_F_Hmmerpfam2align.py
--- a/commons/pyRepetUnit/align/hmmOutputParsing/tests/Test_F_Hmmerpfam2align.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,20 +0,0 @@
-import os
-import unittest
-import commons.pyRepetUnit.hmmer.hmmOutput.HmmpfamOutputProcessing
-from commons.core.utils.FileUtils import FileUtils
-
-class Test_F_Hmmerpfam2align(unittest.TestCase):
-    
-    def setUp(self):
-        self.hmmpfamOutputProcess = commons.pyRepetUnit.hmmer.hmmOutput.HmmpfamOutputProcessing.HmmpfamOutputProcessing()
-        self._inputFile = "./datas/test_hmmpfam_output" 
-        self._outputFile =  "./datas/PostProcessResult.align" 
-        
-    def testAcceptanceHmmpfam2align(self):
-        self.hmmpfamOutputProcess.readHmmOutputsAndWriteAlignFile( self._inputFile, self._outputFile )
-        self.assertTrue(FileUtils.isRessourceExists(self._outputFile))
-        self.assertTrue(FileUtils.are2FilesIdentical(self._inputFile + ".align", self._outputFile))
-        os.remove(self._outputFile)
-        
-if __name__ == "__main__":                 
-    unittest.main()
\ No newline at end of file
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/pyRepetUnit/align/hmmOutputParsing/tests/Test_F_HmmpfamOutput2align.py
--- a/commons/pyRepetUnit/align/hmmOutputParsing/tests/Test_F_HmmpfamOutput2align.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,22 +0,0 @@
-import os
-import unittest
-from commons.pyRepetUnit.align.hmmOutputParsing.HmmpfamOutput2align import HmmpfamOutput2align
-from commons.core.utils.FileUtils import FileUtils
-
-class Test_F_HmmpfamOutput2align(unittest.TestCase):
-    
-    def setUp(self):
-        self.hmmpfamOutput2align = HmmpfamOutput2align()
-        self._inputFile = "./datas/test_hmmpfam_output"
-        self._outputFile = "./datas/hmmpfam_output.align"
-        
-    def testParseHmmpfamOutput2align(self):
-        self.hmmpfamOutput2align.setInputFile(self._inputFile)
-        self.hmmpfamOutput2align.setOutputFile(self._outputFile)
-        self.hmmpfamOutput2align.run()
-        self.assertTrue(FileUtils.isRessourceExists(self._outputFile))
-        self.assertTrue(FileUtils.are2FilesIdentical(self._inputFile + ".align", self._outputFile))
-        os.remove( self._outputFile )
-        
-if __name__ == "__main__":                 
-    unittest.main()
\ No newline at end of file
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/pyRepetUnit/align/hmmOutputParsing/tests/Test_F_HmmscanOutput2align.py
--- a/commons/pyRepetUnit/align/hmmOutputParsing/tests/Test_F_HmmscanOutput2align.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,27 +0,0 @@
-import os
-import unittest
-from commons.pyRepetUnit.align.hmmOutputParsing.HmmscanOutput2align import HmmscanOutput2align
-from commons.core.utils.FileUtils import FileUtils 
-
-CURRENT_DIR = os.getcwd()
-
-class Test_F_HmmscanOutput2align(unittest.TestCase):
-
-    def setUp(self):
-        self.hmmscanOutput2align = HmmscanOutput2align()
-        self._inputFile = os.environ["REPET_PATH"] + "/commons/pyRepetUnit/hmmer/hmmOutput/tests/datas/hmmscanOutput"
-        self._outputFile = "./datas/test_hmmscanOutput.align"
-        os.chdir(CURRENT_DIR)
-
-    def testParseHmmscanOutput2align(self):
-        self.hmmscanOutput2align.setInputFile(self._inputFile)
-        self.hmmscanOutput2align.setOutputFile(self._outputFile)
-        self.hmmscanOutput2align.run()
-        expectedFile = os.environ["REPET_PATH"] + "/commons/pyRepetUnit/hmmer/hmmOutput/tests/datas/hmmscanOutput.align"
-        self.assertTrue(FileUtils.isRessourceExists(self._outputFile))
-        self.assertTrue(FileUtils.are2FilesIdentical(expectedFile, self._outputFile))
-        os.remove( self._outputFile )
-        
-
-if __name__ == "__main__":
-    unittest.main()
\ No newline at end of file
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/pyRepetUnit/align/hmmOutputParsing/tests/datas/ConsensusTestFile_nt.fsa
--- a/commons/pyRepetUnit/align/hmmOutputParsing/tests/datas/ConsensusTestFile_nt.fsa Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,18 +0,0 @@
->blumeria_Grouper_590_20:NoCat
-TTTCGATCNTATTGAAATGTATAACCCACTACTTAGTTCGTGGACTTGTTGGTAGAGGGA
-AGCTTATGCAATAATGAAGGATAAAAGGATGTCAATTCGACTACTCTTCTAAACACAGAT
-ACCAGACTCCTTTTAATCCCAATAGATAGCCCGTGCGGGATCTCCTATTAACAGCAGTAA
-ACAACGCTAACACAGGGTATACGCAATCTCCGTTCGCCAAACACCAGTCTGTCGGGACTA
-CTAATTATCGAGCCTAGTAGGATCGACAATGTGTATCCCAACATAGAAATAATAGAAAGC
-TCAACACCCAAACCCCTCATCAATAACTGCCATTAATCATCACCTGACTTATCTCTGTAC
-TCCATAATTTCAACACTNAAGAATATTTGTA
->blumeria_Grouper_4152_12:NoCat
-GGACCGGCCGCCACGAATTGCGCGATTGCTGCTCGCAAGTAGACTTTGATGGAGTCTACA
-AAATTTTTGTCTTCACCGGTGGAGAGCGGTTGAAGAGCTGCCTCGACACTGCTAATAGCC
-GTCGAGCATATTGTGAATTGCGCGGCTTTTTGTCTTGCCCTGCGCTCCTCCGCTTCGATC
-GCTGCAAGCAATTCTGGAGGGTGTGTATTTTTTCTGCCTGCTGCTTCTAGTGCTGGAGGC
-TGCGGGGCCAGTGGAGGGTTTTCGGCTCCTGCTGCCTTAGTGGATGGTGTTTCAGCCCTT
-TTCGCGGGCCTCACTTCTGCAGGTCGCGGTAGTGCTGGAACCGTGATGCGCTTCTCGGGT
-GCGACGACGGTTTTTCTGGGGGATCCGGTGGGATCCAAGACTTGCTCTGCGTCTTCTGGG
-CTGGAGGATGCCCAAACTGAATCGGCGAGGGTTTTTAGCTTCTCGACTTCTGCGTCCACC
-ATATCTACCTCGGGGACATTG
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/pyRepetUnit/align/hmmOutputParsing/tests/datas/OutputHmmpfamTest
--- a/commons/pyRepetUnit/align/hmmOutputParsing/tests/datas/OutputHmmpfamTest Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
b'@@ -1,406 +0,0 @@\n-hmmpfam - search one or more sequences against HMM database\n-HMMER 2.3.2 (Oct 2003)\n-Copyright (C) 1992-2003 HHMI/Washington University School of Medicine\n-Freely distributed under the GNU General Public License (GPL)\n-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n-HMM file:                 /home/choede/hmmer3/Pfam_fs\n-Sequence file:            ConsensusTestFile_aaWithoutStop.fsa\n-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n-\n-Query sequence: blumeria_Grouper_590_20:NoCat_1\n-Accession:      [none]\n-Description:    [none]\n-\n-Scores for sequence family classification (score includes all domains):\n-Model           Description                             Score    E-value  N \n---------        -----------                             -----    ------- ---\n-DUF234          Archaea bacterial proteins of unknown     3.2        1.5   1\n-DUF1414         Protein of unknown function (DUF1414)     2.9        6.3   1\n-\n-Parsed for domains:\n-Model           Domain  seq-f seq-t    hmm-f hmm-t      score  E-value\n---------        ------- ----- -----    ----- -----      -----  -------\n-DUF234            1/1      91   108 ..     5    22 ..     3.2      1.5\n-DUF1414           1/1     111   119 ..     1     9 [.     2.9      6.3\n-\n-Alignments of top-scoring domains:\n-DUF234: domain 1 of 1, from 91 to 108: score 3.2, E = 1.5\n-                   *->VyPNrseIEsGnikevle<-*\n-                      VyPN++ IEs ++k++++   \n-  blumeria_G    91    VYPNIEIIESSTPKPLIN    108  \n-\n-DUF1414: domain 1 of 1, from 111 to 119: score 2.9, E = 6.3\n-                   *->HkAPvDLSL<-*\n-                      H  ++DLSL   \n-  blumeria_G   111    HXSSPDLSL    119  \n-\n-//\n-\n-Query sequence: blumeria_Grouper_590_20:NoCat_2\n-Accession:      [none]\n-Description:    [none]\n-\n-Scores for sequence family classification (score includes all domains):\n-Model    Description                                    Score    E-value  N \n--------- -----------                                    -----    ------- ---\n-\t[no hits above thresholds]\n-\n-Parsed for domains:\n-Model    Domain  seq-f seq-t    hmm-f hmm-t      score  E-value\n--------- ------- ----- -----    ----- -----      -----  -------\n-\t[no hits above thresholds]\n-\n-Alignments of top-scoring domains:\n-\t[no hits above thresholds]\n-//\n-\n-Query sequence: blumeria_Grouper_590_20:NoCat_3\n-Accession:      [none]\n-Description:    [none]\n-\n-Scores for sequence family classification (score includes all domains):\n-Model    Description                                    Score    E-value  N \n--------- -----------                                    -----    ------- ---\n-CPW_WPC  Plasmodium falciparum domain of unknown func     1.5        7.7   1\n-HECT     HECT-domain (ubiquitin-transferase)              0.0        9.2   1\n-\n-Parsed for domains:\n-Model    Domain  seq-f seq-t    hmm-f hmm-t      score  E-value\n--------- ------- ----- -----    ----- -----      -----  -------\n-CPW_WPC    1/1      30    37 ..     1     9 [.     1.5      7.7\n-HECT       1/1      55    69 ..   341   355 .]     0.0      9.2\n-\n-Alignments of top-scoring domains:\n-CPW_WPC: domain 1 of 1, from 30 to 37: score 1.5, E = 7.7\n-                   *->CerdYsisk<-*\n-                      C++dYs sk   \n-  blumeria_G    30    CQFDYS-SK    37   \n-\n-HECT: domain 1 of 1, from 55 to 69: score 0.0, E = 9.2\n-                   *->LllAIneeteGFgle<-*\n-                      Ll+A+n+ + G+ ++   \n-  blumeria_G    55    LLTAVNNANTGYTQS    69   \n-\n-//\n-\n-Query sequence: blumeria_Grouper_590_20:NoCat_4\n-Accession:      [none]\n-Description:    [none]\n-\n-Scores for sequence family classification (score includes all domains):\n-Model    Description                                    Score    E-value  N \n--------- -----------                                    -----    ------- ---\n-DUF46    Putative integral membrane protein DUF46         6.4       0.11   1\n-\n-Parsed for domains:\n-Model    Domain  seq-f seq-t    hmm-f hmm-t      score  E-value\n----'..b'inal do     1.8        3.8   1\n-Jun            Jun-like transcription factor             -0.7        6.5   1\n-\n-Parsed for domains:\n-Model          Domain  seq-f seq-t    hmm-f hmm-t      score  E-value\n---------       ------- ----- -----    ----- -----      -----  -------\n-DUF1798          1/1       2    19 ..    35    52 ..     3.0      3.3\n-DUF881           1/1      46    69 ..   214   237 .]     4.0      1.6\n-Jun              1/1      77    93 ..   264   284 ..    -0.7      6.5\n-SLT              1/1      89   108 ..     1    20 [.     4.5      1.2\n-DUF2346          1/1      93   115 ..    63    85 .]     3.2      2.8\n-LBP_BPI_CETP     1/1     124   139 ..   191   209 .]     1.8      3.8\n-\n-Alignments of top-scoring domains:\n-DUF1798: domain 1 of 1, from 2 to 19: score 3.0, E = 3.3\n-                   *->KPfvdevdqllaeWkelA<-*\n-                      +P+vd+vd++++++k+lA   \n-  blumeria_G     2    VPEVDMVDAEVEKLKTLA    19   \n-\n-DUF881: domain 1 of 1, from 46 to 69: score 4.0, E = 1.6\n-                   *->VeksdditiPAydgplklrYAkPv<-*\n-                      V  + +it+PA++ p  +r Ak++   \n-  blumeria_G    46    VAPEKRITVPALPRPAEVRPAKRA    69   \n-\n-Jun: domain 1 of 1, from 77 to 93: score -0.7, E = 6.5\n-                   *->qHheNPpgfqhsavgpPRlaa<-*\n-                      +++eNPp+    a++pP+l a   \n-  blumeria_G    77    AGAENPPL----APQPPALEA    93   \n-\n-SLT: domain 1 of 1, from 89 to 108: score 4.5, E = 1.2\n-                CS    HHHHHHHHHHTS-HHHHHHH   \n-                   *->dliikaaekygidpsllaAi<-*\n-                      ++ ++a+ k+ ++p llaAi   \n-  blumeria_G    89    PALEAAGRKNTHPPELLAAI    108  \n-\n-DUF2346: domain 1 of 1, from 93 to 115: score 3.2, E = 2.8\n-                   *->AtKRrEkhdneLlealeeeEaKk<-*\n-                      A  R+  h  eLl+a+e eE+     \n-  blumeria_G    93    AAGRKNTHPPELLAAIEAEERRA    115  \n-\n-LBP_BPI_CETP: domain 1 of 1, from 124 to 139: score 1.8, E = 3.8\n-                CS    HHHHHHHCHHHH...HTTS   \n-                   *->lCPviessVnslNvhLstl<-*\n-                      +C +++ssV++    L++l   \n-  blumeria_G   124    ICSTAISSVEAA---LQPL    139  \n-\n-//\n-\n-Query sequence: blumeria_Grouper_4152_12:NoCat_6\n-Accession:      [none]\n-Description:    [none]\n-\n-Scores for sequence family classification (score includes all domains):\n-Model      Description                                  Score    E-value  N \n---------   -----------                                  -----    ------- ---\n-DUF258     Protein of unknown function, DUF258            1.5        3.8   1\n-TRAP_alpha Translocon-associated protein (TRAP), alph     0.1        4.1   1\n-DUF1289    Protein of unknown function (DUF1289)          2.8        5.3   1\n-SOCS_box   SOCS box                                       2.4        9.7   1\n-\n-Parsed for domains:\n-Model      Domain  seq-f seq-t    hmm-f hmm-t      score  E-value\n---------   ------- ----- -----    ----- -----      -----  -------\n-DUF258       1/1      50    62 ..   293   305 .]     1.5      3.8\n-SOCS_box     1/1      85    90 ..     1     6 [.     2.4      9.7\n-DUF1289      1/1      95   115 ..    36    56 .]     2.8      5.3\n-TRAP_alpha   1/1     106   116 ..   317   327 .]     0.1      4.1\n-\n-Alignments of top-scoring domains:\n-DUF258: domain 1 of 1, from 50 to 62: score 1.5, E = 3.8\n-                CS    -HHHHHHHHHHHH   \n-                   *->seeRYesYlklle<-*\n-                      s++R+++Y+ l++   \n-  blumeria_G    50    SASRFQHYRDLQK    62   \n-\n-SOCS_box: domain 1 of 1, from 85 to 90: score 2.4, E = 9.7\n-                   *->prSLqh<-*\n-                      prSLqh   \n-  blumeria_G    85    PRSLQH    90   \n-\n-DUF1289: domain 1 of 1, from 95 to 115: score 2.8, E = 5.3\n-                   *->dERravlqllpqRlaalglkp<-*\n-                      +E+ + lq+++qR +++++ +   \n-  blumeria_G    95    AEKIHTLQNCLQRSKRRSAGQ    115  \n-\n-TRAP_alpha: domain 1 of 1, from 106 to 116: score 0.1, E = 4.1\n-                   *->kRkvKRsvGdD<-*\n-                      +R  +Rs+G+D   \n-  blumeria_G   106    QRSKRRSAGQD    116  \n-\n-//\n'
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/pyRepetUnit/align/hmmOutputParsing/tests/datas/PostPostProcessTestFiltered.align
--- a/commons/pyRepetUnit/align/hmmOutputParsing/tests/datas/PostPostProcessTestFiltered.align Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,25 +0,0 @@
-blumeria_Grouper_590_20:NoCat 271 324 DUF234 5 22 1.5 3 0.000000
-blumeria_Grouper_590_20:NoCat 331 357 DUF1414 1 9 6.3 2 0.000000
-blumeria_Grouper_590_20:NoCat 90 113 CPW_WPC 1 9 7.7 1 0.000000
-blumeria_Grouper_590_20:NoCat 119 148 DUF46 182 173 0.11 6 0.000000
-blumeria_Grouper_4152_12:NoCat 97 201 TrbL 231 285 8 0 0.000000
-blumeria_Grouper_4152_12:NoCat 172 240 TNV_CP 167 189 7.9 0 0.000000
-blumeria_Grouper_4152_12:NoCat 280 327 DGOK 283 298 1.3 0 0.000000
-blumeria_Grouper_4152_12:NoCat 337 381 Peptidase_S29 1 15 1.1 4 0.000000
-blumeria_Grouper_4152_12:NoCat 442 471 DUF1301 1 10 9.9 0 0.000000
-blumeria_Grouper_4152_12:NoCat 62 79 Toxin_18 50 55 4.4 4 0.000000
-blumeria_Grouper_4152_12:NoCat 377 412 ABC_transp_aux 276 287 5.2 1 0.000000
-blumeria_Grouper_4152_12:NoCat 428 478 DUF1602 23 39 0.39 5 0.000000
-blumeria_Grouper_4152_12:NoCat 306 368 zf-P11 1 20 1.8 3 0.000000
-blumeria_Grouper_4152_12:NoCat 378 407 V-ATPase_G 1 10 5.3 2 0.000000
-blumeria_Grouper_4152_12:NoCat 136 228 XhoI 202 172 0.014 9 0.000000
-blumeria_Grouper_4152_12:NoCat 145 165 Endomucin 267 261 6 0 0.000000
-blumeria_Grouper_4152_12:NoCat 444 497 DUF1798 52 35 3.3 3 0.000000
-blumeria_Grouper_4152_12:NoCat 294 365 DUF881 237 214 1.6 4 0.000000
-blumeria_Grouper_4152_12:NoCat 177 236 SLT 20 1 1.2 4 0.000000
-blumeria_Grouper_4152_12:NoCat 156 224 DUF2346 85 63 2.8 3 0.000000
-blumeria_Grouper_4152_12:NoCat 84 131 LBP_BPI_CETP 209 191 3.8 1 0.000000
-blumeria_Grouper_4152_12:NoCat 314 352 DUF258 305 293 3.8 1 0.000000
-blumeria_Grouper_4152_12:NoCat 230 247 SOCS_box 6 1 9.7 2 0.000000
-blumeria_Grouper_4152_12:NoCat 155 217 DUF1289 56 36 5.3 2 0.000000
-blumeria_Grouper_4152_12:NoCat 152 184 TRAP_alpha 327 317 4.1 0 0.000000
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/pyRepetUnit/align/hmmOutputParsing/tests/datas/hmmscanTransformedExpected.align
--- a/commons/pyRepetUnit/align/hmmOutputParsing/tests/datas/hmmscanTransformedExpected.align Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,7 +0,0 @@
-Polinton-1_DY:classII:Polinton 2974 3642 DNA_pol_B_2 13 252 3.7e-06 24 0.000000
-Polinton-1_DY:classII:Polinton 7897 7944 ASFV_p27 59 74 6 4 0.000000
-Polinton-1_DY:classII:Polinton 9022 9123 Ribosomal_S4 39 72 18 4 0.000000
-Polinton-1_DY:classII:Polinton 11896 11955 Homo_sperm_syn 49 68 8.8 2 0.000000
-Polinton-1_DY:classII:Polinton 5480 5932 rve 168 4 6.7e-30 103 0.000000
-Polinton-1_DY:classII:Polinton 5099 5191 Chromo 51 4 8.5e-06 24 0.000000
-Polinton-1_DY:classII:Polinton 8408 8434 GARS_A 204 196 11 2 0.000000
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/pyRepetUnit/align/hmmOutputParsing/tests/datas/repetHmmscan.fa
--- a/commons/pyRepetUnit/align/hmmOutputParsing/tests/datas/repetHmmscan.fa Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
b'@@ -1,314 +0,0 @@\n->SAR:satellite:satellite\n-acagtatataatatatattttgggtactttgatattttatgtacagtatataatatatat\n-tttgggtactttgatattttatgt\n->BARI_DM:classII:TIR\n-acagtcatggtcaaaattattttcacaaagtgcatttttgtgcatgggtcacaaacagtt\n-gcttgtgcagcaagtggggggaggtgaaatgcaaaaaaacttttgcttttgcaaattcaa\n-acctatgcagagtcagatgaaagaagaattgaaaaaataactgttcctatgcgcaaggaa\n-gaggcaaatgaagagatctttatcagttgtcagaagtatttgcacacggtttcgtcgcat\n-cacaattattttcacaacgcaatttcttcttcagtgattggtttagagtgacaagtgccg\n-gtttgtttgcttaaatacatttaaattattgaataaaaattagatttaatcattttccta\n-ttacagttattaaataaaatgcccaaaacaaaagagttaacagttgaggcccgggctggt\n-attgttgctaggtttaaagccggtacacctgcggccaaaatagctgaaatatatcaaatt\n-tcgcgtagaactgtctactacttaataaaaaagtttgatacagttggcacattaaaaaat\n-aaaaaaagatcaggccgaaaacctgtgctggaccaaaggcaatgcaggcaaatacttgga\n-gttgtggcgaagaatcctagtgccagtccggtaaaaattgccttagaatcaaaaaataca\n-attggcaaacaagttagtagttctacaattcgtcgcaggctaaaagaagctgattttaag\n-acatacgttgttcgcaaaacgattgagatcacaccaaccaacaaaacaaaacgtcttcga\n-tttgcgttggaatatgttaagaagcctcttgacttttggtttaatattttatggactgat\n-gagtctgcatttcagtaccaggggtcatacagcaagcattttatgcatttgaaaaataat\n-caaaagcatttggcagcccagccaaccaatagatttggtgggggcacagtcatgttttgg\n-ggatgtctttcctattatggattcggagacttggtaccgatagaaggaactttaaatcag\n-aacggataccttcttatcttaaacaaccatgcttttacgtctggaaatagactttttcca\n-actactgaatggattcttcagcaggacaatgctccatgccataagggtaggataccaaca\n-aaatttttaaacgaccttaatctggcggttcttccgtggcccccccaaagcccagacctt\n-aatatcattgaaaacgtttgggcttttattaaaaaccaacgaactattgataaaaataga\n-aaacgagagggagccatcattgaaatagcggagatttggtccaaattgacattagaattt\n-gcacaaactttggtaaggtcaataccaaaaagacttcaagcagttattgatgccaaaggt\n-ggtgttacaaaatattagtattgtatttatataaaataaagaaattcttatgttgaaatt\n-agatgttaagctgaaatttactaaattaagttgagtgaaaatacttttgaagcgcaataa\n-acatgtgaaaatactattgacaacttgcatgcatattttcttttgctttaagctttgtac\n-tatgaaccgttatctttcgtatttcttttcgactaccttctgcatagatcaagctaagcg\n-ataagaactatttcaggcaaatcggacaacaacaagaagaaatataacaaaaagaagttg\n-aagtttgcaaatattgtgcgttgtgaaaatacttttgaccacctctgt\n->MOLLY_SN:classII:TIR\n-acgtacctcacgggttggccggacacacggtttggccggacacttttgccaagcccccac\n-caaattctacctctcaacgtgatgcctcaacaacaacaccagatagacccttctagcgaa\n-cgtcatatacagactgcccttcaagctcttaaacaagacgcgacactgtccttgcgacgc\n-gctgcagctatctataacgtctctcgagcaacactaagcgatcgacgcgctggacggcct\n-tcacaagcagattgctggcctaaaacaaagaatctaactaagactgaggaggacgtagtt\n-gttaagcatatacttgagctggttacgcgtggatttcctcctaggctcgcagctgtggct\n-gatatggctaattccctgcgcgctgagcgcggtctgggccaagttggctcaaactggccc\n-agtacgttcgtcaaacgccgccctgagctccaaacgaagtttaatcgcaaatacgactac\n-aagagagccctctgcgaggatcctgaggttatacgagactggttccggcttgtagagaac\n-atgaaggcgaagcacggtatccttgatggcgacatgtacaactttgacgagtctggcttt\n-atgatgggccagatctcaactggagcagtcgttacagcttcagagcgacgaggacggccg\n-aagacagtgcaacagggcaatcgagagtggacgacggtcatccagggcgtcaacgcaaca\n-gggtgggccattccacccttcatcatcttcaagggccgccaccacctctcagcttggtat\n-aaggaggaggatctacctcataattgggttattgcagtctctaagaacggctggacaaca\n-aatgagctcggtctgcagtggttaaagcactttgatgagcatacaaagaggagggttaca\n-ggcgcttatcggctgcttattatcgacggccatgagagccacgactcgcttgaattccag\n-caatactgcaaggataacaagattatcactctctgcatgcctcctcactcgtcgcacctc\n-ctgcagcctcttgatgtgggttgttttgcctctttaaagaaggcgtacagacgccaagcc\n-gaagagctcatgcgcaaccggatcacgcacatcacgaaacttgagttcctaccgtgcttt\n-aagcgcgcctttgacgcagcaattactcctagtaatatccaaggagggtttcgaggcgct\n-ggattggtcccatttgacccagagcgggtcatattagcccttgacgtccgcatccgtacc\n-ccaccgttgcccaccgtcgaagactgtccctggcagtcgcaaactccaagtaataccctt\n-gaattaggatcgcaatcgacgcttgtaaaggcaaggattcagaggcatatagatagctca\n-ccaacgtctatggtggaggcctttgagaaggtctcaaaaggggcagcgattattgcgcac\n-aagctagtgttggcgcagaaggagattgctgagcttcgagcagctaataaggccgccacg\n-cgacgtaaatcgcacaaaagaaagcgtgtacaggaagaagggaccttgacggtcgaggac\n-ggtcttcgacggacgactctaaaggagtttggtgcgcgtagtgatgggaagaaggcgaag\n-aagcaggttcgcgctggtgcaggcgagccctcccaaaggcggtgtggacggtgcaatgag\n-actgggcataatgcgcgtacgtgtaagaaaacagtagaagtagactctgaatgatattgc\n-atcttgctttgtactatacagggccaaagtgggttgttttgcgccagaatagggtggttt\n-tggtgggggcttggcaaaagtgtccggccaaaccgtgtgtccggccaacccgtgaggtac\n-gt\n->Polinton-1_DY:classII:Polinton\n-aaaaaaaaaacaagttgggtgtcattggaaaggatttttcaagccctttccaatggtatg\n-cttttcacgattct'..b'tgtcaa\n-taatgttgacttaagaattaattttaatattgaaaaaactgcattttatttaatggaaaa\n-ggatagcgaatcaaatttaaagatattagaagcacaacttttcatgaatcatgtaactgt\n-gaacccaagcattttattggctcatcatcatgttttacaaacaaaaaatgctctttaccc\n-attcagtaaagtagaagtaaaatcgtttacaatttacccaggaaacaatacgctatcaat\n-agacaatgctgtaattggacaattaccaaattttctagctttttgtatgattaaaaaccg\n-ttcatactcaggcaacagaggactagatccatttaattttgaacattttaaaatgcaacg\n-ctttaatctaatggtgaatggagttcaagttccttcgcaagctctggaatttgactactc\n-gaactctgaaaacgttcaaagctcaagaggctataatatgctattcagatcaagcggaat\n-aaaacattatgatcggggtcttcaaattaccaaggaaatgtttgatacgaacagttttat\n-attagcctttgatttaactgctgatcagtcaaataccaccatatgttcaaatttgatgtc\n-gcaaggcacaataagaatcgaaggaagattttcagaacctcttagtgaagccgttacttg\n-tctggtatattgtgaatacgattccatgattgatattgataagcatagaaatattcgaac\n-ccttttttaaaatgaatactttacaaattcacaatttgcttacaaaacatatatacacaa\n-aatcaatttttaaaggagttttcccttcagaccagcttccaaaaactatttcaaagtatc\n-cggctttaattattgcaaacaccgacacttcagatcaaccaggaactcattggattgcat\n-tctatttcgaaagtcgcaaatcagcagaattttttgattcctatggacaatttccccaaa\n-acaaggaattcgtgacatttttaaaatctaacgcaaataaatattgctataacaagcaac\n-aactacaaggatatttttctaatacgtgtggtcattattgcataatgtatggtcttttta\n-aatgtaaaaagaaaacgctaaaatatttattaacaaattttaagagaaatgacttttcat\n-ataacgataaattaatacttaaaatgtttaagtctaattttaaaaaataaaatgcaagat\n-atttaagaaaatcaatgtagtttatttattaagtcgtttgtttagcttataatattttaa\n-cataatattgaaggcctcgtctcttaaaattggaagcctatgacactggcacgtatcggg\n-tccttccgaagcgtcatcatcactccagggacaaagcttgtagtggaatccatatttaga\n-atggatcagttctttatcctctaagtcctccagagtgctcttcaaatatataagctgcgt\n-tacgtgctcctcaaatatcatgtcttcgaactgcatcaagaagagctcaatttgtttgga\n-gtccattttcgttatggttcttttaaggttttttaaagactgatgttggatttagaaaac\n-tcaaacctttatattggaaaatttcatttacttatttatttactgataaaaattcaattc\n-gtgcagaactatatctatttacatccttccccttatataccatatgggtaataccattct\n-catttaatttcctaaaaggtgtcttagtacagaatttgtttacataactcttaggtagaa\n-aaatccaaacatctttttcgtccttgtctgctaaataaagagctaccttagttccataag\n-gtgtctttttcagcttacaaccagtgatcttatactcaaatccaatacatagatcttcag\n-tttttgtataaccaatcacaggcttcgattcattcagagtctctaggaaatcctagaaat\n-tcaataaaatttgaacaggatttatttattaatgtcctatatgcataccatttctgacca\n-acgtgagatttgattcgttatgctcttgtaactattcgtattatactaatgcatttactt\n-acaattacgagacttttatactgttcagcactacatatatatatatatatatatatatta\n-caagaacaaaatactacgtgaaagagataccaatatatctgttatgctctttatatacat\n-aaactcagttaagcctatgtagaatatttttatatacttgagtatatctatctcattttg\n-tataaatatataacttcatatgaaataaaaggttactacaaacctaatataagacagcac\n-ttttctcgaaaactcagattcaatttttactctcagaatgacaaagttgtattgtgagtt\n-gtgttcggaaacaaaatcgtttgcttcacgcagcggtttaaaaaaacataccttaaaagt\n-gcataacttcagctatcaaaaatcaaaatcttcttattattgttgctttttctgtcccaa\n-tgaacgaaaattctggttgcgatataattacaatgttcatctcttgctgatgcacgatgc\n-agaattaaagagtatgcgtaaatcaatggaaagttatcaaataaagataaaacaagtttg\n-agaatttaattttgtaaaatagttttatttaataaatttctgtataatatagacaaatta\n-aaaacctagatcaaataaaacgtctagtaatgaatggtcatcttcatccttcattattcg\n-taaataaatgttgggttgacttggctcgatgaactgatcaaaaatatgatcatcatcagg\n-aaactcatagattataggatctgtgtgcagtatatccatatcgaaatgctgtgcacattg\n-catttcttgatcgtctccattgcctcgtataagatcatttaaaacgtcctgcgttgccgc\n-tccaaaaggaaaatcgctccactcaagagacgcaaattcacttccaatttttgtagtggg\n-ggtagatgacatagaagggtcaaatactcctcttaagaagcgatctatcgaatcctctgt\n-gtcgatagcctccacataaccttccttcgagccttcaattatttcgacatcagagtcttg\n-agttaatggaacatttattccatttactgagtcaacaaactctacagtaagatccattgg\n-tatgcagtgctgaggtattataagaactgatcctgagcaatttaaggggatccattttta\n-tacacgaggattagagagtttgacatctacagggggtgtctactcttagaatccacctga\n-ttggttctcgatttaaggagccttcacagactgcagactgcacagactgcaatggggaag\n-tcagaaaaggagggcgagctatgggtttggatgcaggtaaatagccgcttgactttctcg\n-ataataggttcaaagagtcataaatatttgattttatggggtctcctagcataatgaaaa\n-tggagacagatcacagataatctgaaatacatatctctgtagggaattatttcggatgac\n-cgcagtcagggatcatgaaattattggtgactactagtcattgttactttataagtaaca\n-ttttgcaaggcatacatttaaaacgtgggtagccttaagctgaaagtcgctatgacttca\n-gattgtttagattttcttctcaacggctccatagcttttagctgaaagtagctggaatat\n-acgggaacgacggttttttaacggttttatgattatatgattttttatatatacgtatac\n-acgaccctataaccagtttgtttgatatttctaaatatttctcaactaataatccaacca\n-ccagttaccttcccagaaaattgaggacacagtaaggtgcatagccttgaacagaaatct\n-cacccccacccttgcgatcatc\n'
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/pyRepetUnit/align/hmmOutputParsing/tests/datas/test_hmmpfam_output
--- a/commons/pyRepetUnit/align/hmmOutputParsing/tests/datas/test_hmmpfam_output Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
b'@@ -1,321 +0,0 @@\n-hmmpfam - search one or more sequences against HMM database\n-HMMER 2.3.2 (Oct 2003)\n-Copyright (C) 1992-2003 HHMI/Washington University School of Medicine\n-Freely distributed under the GNU General Public License (GPL)\n-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n-HMM file:                 myhmms\n-Sequence file:            test.fa\n-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n-\n-Query sequence: pkinase_full\n-Accession:      [none]\n-Description:    Dario rerio\n-\n-Scores for sequence family classification (score includes all domains):\n-Model    Description                                    Score    E-value  N \n--------- -----------                                    -----    ------- ---\n-pkinase  Protein kinase domain                          266.6    3.3e-80   1\n-pkinase  Protein kinase domain                          265.4    7.6e-80   1\n-rrm                                                     -42.5        2.5   1\n-rrm                                                      -8.7        3.7   1\n-fn3      Fibronectin type III domain                    -45.8        3.7   1\n-fn3      Fibronectin type III domain                     -9.0        3.8   1\n-\n-Parsed for domains:\n-Model    Domain  seq-f seq-t    hmm-f hmm-t      score  E-value\n--------- ------- ----- -----    ----- -----      -----  -------\n-rrm        1/1     169   180 ..    66    77 .]    -8.7      3.7\n-fn3        1/1     197   200 ..    81    84 .]    -9.0      3.8\n-rrm        1/1     256   319 ..     1    77 []   -42.5      2.5\n-pkinase    1/1     258   540 ..     1   294 []   266.6  3.3e-80\n-pkinase    1/1     258   537 ..     1   289 [.   265.4  7.6e-80\n-fn3        1/1     434   506 ..     1    84 []   -45.8      3.7\n-\n-Alignments of top-scoring domains:\n-rrm: domain 1 of 1, from 169 to 180: score -8.7, E = 3.7\n-                   *->nGkelggrklrv<-*\n-                      n++    ++l v   \n-  pkinase_fu   169    NKQDPHQHRLSV    180  \n-\n-fn3: domain 1 of 1, from 197 to 200: score -9.0, E = 3.8\n-                CS    CCCC   \n-                   *->GpeS<-*\n-                      G eS   \n-  pkinase_fu   197    GGES    200  \n-\n-rrm: domain 1 of 1, from 256 to 319: score -42.5, E = 2.5\n-                   *->lfVgNL..ppdvteedLkdlFsk.fGpivsikivkDhkektketgks\n-                         +N++  +d+ e    + F+ +        +++           +\n-  pkinase_fu   256    ---NNIeyVRDIGEGAFGRVFQArAPGL----LPTE----------P 285  \n-\n-                   kGfaFVeFeseedAekAlealnG.kelggrklrv<-*\n-                     +  V++ +ee+ ++  ++++ +  l++   +    \n-  pkinase_fu   286 FTMVAVKMLKEEASTDMQNDFQReAALMSEFDHP    319  \n-\n-pkinase: domain 1 of 1, from 258 to 540: score 266.6, E = 3.3e-80\n-                   *->yelleklGeGsfGkVykakhkd....ktgkiVAvKilkkekesikek\n-                      +e ++ +GeG+fG+V++a+     +++    VAvK+lk e+ s++  \n-  pkinase_fu   258    IEYVRDIGEGAFGRVFQARAPGllptEPFTMVAVKMLK-EEASTDMQ 303  \n-\n-                   .rflrEiqilkrLsHpNIvrligvfedtddhlylvmEymegGdLfdylrr\n-                   ++f+rE++++ +++HpNIvrl+gv+   +++++l +Eym  GdL+++lrr\n-  pkinase_fu   304 nDFQREAALMSEFDHPNIVRLLGVCA-VGKPMCLMFEYMAYGDLNEFLRR 352  \n-\n-                   ng........................gplsekeakkialQilrGleYLHs\n-                   +  +++++ ++++ ++++  +++++  pls +e ++i +Q++ G++YL +\n-  pkinase_fu   353 RCatqqpslsrdtltssslvseperyPPLSCQEQLSISKQVAAGMAYLSE 402  \n-\n-                   ngivHRDLKpeNILldendgtvKiaDFGLArlle..sssklttfvGTpwY\n-                   +++vHRDL+++N+L+ en  +vKiaDFGL+r ++  +++k++ +   p +\n-  pkinase_fu   403 RKFVHRDLATRNCLVAEN-LVVKIADFGLSRNIYaaDYYKASENDAIPIR 451  \n-\n-                   mmAPEvilegrgysskvDvWSlGviLyElltggplfpgadlpaftggdev\n-                   +m+PE  ++++ y+s++DvW++Gv+L+E++++g                 \n-  pkinase_fu   452 WMPPES-IFYNRYTSESDVWAYGVVLWEIFSYG----------------- 483  \n-\n-                   dqliifvlklPfsdelpktridpleelfriikrpglrlplpsncSeelkd\n-                           ++P+++       +  ee+ + +++ g  l +p+nc+ el+ \n-  pkinase_fu   484 --------MQPYYG-------'..b'III domain                    -39.7        1.2   1\n-pkinase  Protein kinase domain                           -9.2        1.8   1\n-fn3      Fibronectin type III domain                     -7.5        1.9   1\n-\n-Parsed for domains:\n-Model    Domain  seq-f seq-t    hmm-f hmm-t      score  E-value\n--------- ------- ----- -----    ----- -----      -----  -------\n-fn3        1/1     143   224 ..     1    84 []   -39.7      1.2\n-pkinase    1/1     233   241 ..     1     9 [.    -9.2      1.8\n-rrm        1/1     440   456 ..     1    17 [.    -6.1     0.92\n-rrm        1/1     669   731 ..     1    77 []   -32.5     0.26\n-pkinase    1/1     906  1127 ..     1   294 []  -171.6     0.19\n-fn3        1/1     923   934 ..     1    12 [.    -7.5      1.9\n-\n-Alignments of top-scoring domains:\n-fn3: domain 1 of 1, from 143 to 224: score -39.7, E = 1.2\n-                CS    C CCCCEEEEEECCTTCCEEEEECCCCCCCCCCEEEEE.ECCCCCCC\n-                   *->P.saPtnltvtdvtstsltlsWspptgngpitgYevtyRqpknggew\n-                       + ++t+l++ dv    ++ sWs+ +g+ + tg  v  R + ng  +\n-      S13421   143    IdLEVTGLSCVDVAN--IQESWSKVSGDLKTTGSVVFQR-MINGH-P 185  \n-\n-                CS CCCEEECCCCCECECCEEEEECCCCEEEEEECCC CCCC   \n-                   neltvpgtttsytltgLkPgteYevrVqAvnggG.GpeS<-*\n-                     +++ ++ + + l  L +    +  V  v ++ +G      \n-      S13421   186 EYQQLFRQFRDVDLDKLGESNSFVAHVFRVVAAFdGIIH    224  \n-\n-pkinase: domain 1 of 1, from 233 to 241: score -9.2, E = 1.8\n-                   *->yelleklGe<-*\n-                        +l+klGe   \n-      S13421   233    VSTLKKLGE    241  \n-\n-rrm: domain 1 of 1, from 440 to 456: score -6.1, E = 0.92\n-                   *->lfVgNLppdvteedLkd<-*\n-                      + ++ L++   + d+ d   \n-      S13421   440    VIISFLNEGLRQADIVD    456  \n-\n-rrm: domain 1 of 1, from 669 to 731: score -32.5, E = 0.26\n-                   *->lfVgNL.ppdvteedLkdlFskfGpivsikivkDhkektketgkskG\n-                        V  L+++d+    +   +  f  i   k++ D            +\n-      S13421   669    --VEELpSTDAFHYHISLVMNRFSSI--GKVIDD------------N 699  \n-\n-                   faFVeFeseedAekAlealnGkelggr.klrv<-*\n-                   + FV   ++ + e+ ++ l  k+++   +l++   \n-      S13421   700 VSFVYLLKKLGREHIKRGLSRKQFDQFvELYI    731  \n-\n-pkinase: domain 1 of 1, from 906 to 1127: score -171.6, E = 0.19\n-                   *->yelleklGeGsfGkVykakhkd........ktgkiVAvKilkkekes\n-                      ++l         G++ ++ +  ++ ++ ++ + ++VAv +     ++\n-      S13421   906    FKLMH-------GVIEEGLLQLerinpitgLSAREVAVVKQ---TWN 942  \n-\n-                   ikekrflrEiqilkrLsHpNIvrligvfedtddhlylvmEymegGdLfdy\n-                   + +            L+      ++  fe   + +  v++       +d \n-      S13421   943 LVK----------PDLMGVGMRIFKSLFE-AFPAYQAVFPKFSD-VPLDK 980  \n-\n-                   lrrng....gplsekeakkialQilrGleYLHsngivHRDLKpeNILlde\n-                   l +    +++ +s    ++   Q+                       lde\n-      S13421   981 LEDTPavgkHSISVTTKLDELIQT-----------------------LDE 1007 \n-\n-                   ndgtvKiaDFGLArlle........sssklttfvGTpwYmmAPEvi...l\n-                   +  ++ +    LAr+l +++   + + +++++f+  +++      ++++l\n-      S13421  1008 P-ANLAL----LARQLGedhivlrvNKPMFKSFGKVLVRL-----LendL 1047 \n-\n-                   egrgysskvDvW..SlGviLyElltggplfpgadlpaftggdevdqliif\n-                    +r  s ++  W++++ vi+ ++  g                        \n-      S13421  1048 GQRFSSFASRSWhkAYDVIVEYIEEG------------------------ 1073 \n-\n-                   vlklPfsdelpktridpleelfriikrpglrlplpsncSeelkdLlkkcL\n-                    l++ +++       dp   + +  k   l  + ++++ ++l+ L +k++\n-      S13421  1074 -LQQSYKQ-------DPVTGITDAEKA--LVQESWDLLKPDLLGLGRKIF 1113 \n-\n-                   nkDPskRpGsatakeilnhpwf<-*\n-                   +k  +k p      +i     f   \n-      S13421  1114 TKVFTKHP----DYQI----LF    1127 \n-\n-fn3: domain 1 of 1, from 923 to 934: score -7.5, E = 1.9\n-                CS    CCCCCEEEEEEC   \n-                   *->PsaPtnltvtdv<-*\n-                        + t+l++++v   \n-      S13421   923    INPITGLSAREV    934  \n-\n-//\n-\n'
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/pyRepetUnit/align/hmmOutputParsing/tests/datas/test_hmmpfam_output.align
--- a/commons/pyRepetUnit/align/hmmOutputParsing/tests/datas/test_hmmpfam_output.align Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,18 +0,0 @@
-pkinase_full 169 180 rrm 66 77 3.7 -8.7 0
-pkinase_full 197 200 fn3 81 84 3.8 -9.0 0
-pkinase_full 256 319 rrm 1 77 2.5 -42.5 0
-pkinase_full 258 540 pkinase 1 294 3.3e-80 266.6 0
-pkinase_full 258 537 pkinase 1 289 7.6e-80 265.4 0
-pkinase_full 434 506 fn3 1 84 3.7 -45.8 0
-pkinase_part 169 180 rrm 66 77 3.7 -8.7 0
-pkinase_part 197 200 fn3 81 84 3.8 -9.0 0
-pkinase_part 233 299 fn3 1 84 5.9 -52.2 0
-pkinase_part 256 319 rrm 1 77 2.5 -42.5 0
-pkinase_part 258 400 pkinase 1 116 1.7e-30 101.5 0
-pkinase_part 258 400 pkinase 1 294 1.5e-05 -94.7 0
-S13421 143 224 fn3 1 84 1.2 -39.7 0
-S13421 233 241 pkinase 1 9 1.8 -9.2 0
-S13421 440 456 rrm 1 17 0.92 -6.1 0
-S13421 669 731 rrm 1 77 0.26 -32.5 0
-S13421 906 1127 pkinase 1 294 0.19 -171.6 0
-S13421 923 934 fn3 1 12 1.9 -7.5 0
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/pyRepetUnit/align/tests/Test_AlignListUtils.py
--- a/commons/pyRepetUnit/align/tests/Test_AlignListUtils.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,100 +0,0 @@
-import os
-import unittest
-from commons.pyRepetUnit.align.AlignList import AlignList
-from commons.pyRepetUnit.align.AlignListUtils import AlignListUtils
-from commons.core.utils.FileUtils import FileUtils
-from commons.core.coord.Range import Range
-from commons.core.coord.Align import Align
-
-class Test_AlignListUtils (unittest.TestCase):
-    
-    def setUp(self):
-        self.inputFileName = "dummyAlignFile.align"
-        self.outputFileName = "dummyAlignFile.out"
-        
-    def testRead(self):
-        f = open(self.inputFileName, "w")
-        f.write("blumeria_Grouper_590_20:NoCat_1\t91\t108\tDUF234\t5\t22\t2.6e-60\t0\t3.2\n")
-        f.write("blumeria_Grouper_590_20:NoCat_1\t111\t119\tDUF1414\t1\t9\t6.3\t0\t2.9\n")
-        f.close() 
-        alignRead = AlignListUtils()      
-        tableauAlignInstance = alignRead.read(self.inputFileName)            
-        self.assertEquals(tableauAlignInstance.get(0).range_query.seqname, "blumeria_Grouper_590_20:NoCat_1")
-        self.assertEquals(tableauAlignInstance.get(0).range_query.start, 91)
-        self.assertEquals(tableauAlignInstance.get(0).range_query.end, 108)  
-        self.assertEquals(tableauAlignInstance.get(0).range_subject.seqname, "DUF234")
-        self.assertEquals(tableauAlignInstance.get(0).range_subject.start, 5)
-        self.assertEquals(tableauAlignInstance.get(0).range_subject.end, 22)
-        self.assertEquals(tableauAlignInstance.get(0).e_value, 2.6e-60) 
-        self.assertEquals(tableauAlignInstance.get(0).score, 0)
-        self.assertEquals(tableauAlignInstance.get(0).identity, 3.2)
-        self.assertEquals(tableauAlignInstance.get(1).range_query.seqname, "blumeria_Grouper_590_20:NoCat_1")
-        self.assertEquals(tableauAlignInstance.get(1).range_query.start, 111)
-        self.assertEquals(tableauAlignInstance.get(1).range_query.end, 119)  
-        self.assertEquals(tableauAlignInstance.get(1).range_subject.seqname, "DUF1414")
-        self.assertEquals(tableauAlignInstance.get(1).range_subject.start, 1)
-        self.assertEquals(tableauAlignInstance.get(1).range_subject.end, 9)
-        self.assertEquals(tableauAlignInstance.get(1).e_value, 6.3)
-        self.assertEquals(tableauAlignInstance.get(1).score, 0)
-        self.assertEquals(tableauAlignInstance.get(1).identity, 2.9)
-        os.system("rm " + self.inputFileName)
-        
-    def testWrite(self):
-        f = open("expectedAlignFile.align", "w")
-        f.write("biduleChouetteQuery\t20\t55\tbiduleChouetteSubject\t2\t15\t0.005\t20\t0.000000\n")
-        f.write("trucBiduleQuery\t110\t155\ttrucBiduleSubject\t1\t35\t2\t1\t0.000000\n")
-        f.write("dummyQuery\t1\t65\tdummySubject\t1\t25\t2.6e-60\t50\t0.000000\n")
-        f.close()        
-        listAlignInstance = AlignList()
-        align1 = Align()
-        align1.range_query = Range("biduleChouetteQuery", 20, 55)
-        align1.range_subject = Range("biduleChouetteSubject", 2, 15)
-        align1.e_value = 0.005
-        align1.score = 20
-        listAlignInstance.append(align1)
-        align2 = Align()
-        align2.range_query = Range("trucBiduleQuery", 110, 155)
-        align2.range_subject = Range("trucBiduleSubject", 1, 35)
-        align2.e_value = 2
-        align2.score = 1.5
-        listAlignInstance.append(align2)
-        align3 = Align()
-        align3.range_query = Range("dummyQuery", 1, 65)
-        align3.range_subject = Range("dummySubject", 1, 25)
-        align3.e_value = 2.6e-60
-        align3.score = 50
-        listAlignInstance.append(align3)
-        f = open(self.outputFileName, "w")
-        alignUtils = AlignListUtils()
-        alignUtils.write(listAlignInstance, self.outputFileName)
-        self.assertTrue(FileUtils.are2FilesIdentical(self.outputFileName, "expectedAlignFile.align"))
-        os.system("rm " + self.outputFileName)        
-        os.system("rm expectedAlignFile.align")
-        
-    def testFilterOnAMinimalScore(self):
-        listAlignInstance = AlignList()
-        align1 = Align()
-        align1.range_query = Range("biduleChouetteQuery", 20, 55)
-        align1.range_subject = Range("biduleChouetteSubject", 2, 15)
-        align1.e_value = 5
-        align1.score = -0.5
-        listAlignInstance.append(align1)
-        align2 = Align()
-        align2.range_query = Range("trucBiduleQuery", 110, 155)
-        align2.range_subject = Range("trucBiduleSubject", 1, 35)
-        align2.e_value = 2
-        align2.score = -2.0
-        listAlignInstance.append(align2)
-        align3 = Align()
-        align3.range_query = Range("dummyQuery", 1, 65)
-        align3.range_subject = Range("dummySubject", 1, 25)
-        align3.e_value = 2.6e-60
-        align3.score = 50
-        listAlignInstance.append(align3)
-        expectedAlignInstance = align3
-        alignUtils = AlignListUtils()
-        alignUtils.filterOnAMinimalScore(listAlignInstance, 0)
-        self.assertEquals(listAlignInstance.get(0), expectedAlignInstance)
-        
-if __name__ == "__main__" :
-    unittest.main() 
\ No newline at end of file
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/pyRepetUnit/align/tests/hmmpfamOutputParsingTestSuite.py
--- a/commons/pyRepetUnit/align/tests/hmmpfamOutputParsingTestSuite.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,21 +0,0 @@
-'''
-Created on 29 mai 2009
-
-@author: oinizan
-'''
-import unittest
-import sys
-from commons.pyRepetUnit.align.tests.Test_AlignListUtils import Test_AlignListUtils
-
-
-def main():
-
-        hmmpfamOutputParsingTestSuite = unittest.TestSuite() 
-        hmmpfamOutputParsingTestSuite.addTest(unittest.makeSuite(Test_AlignListUtils,'test'))
-        
-        runner = unittest.TextTestRunner(sys.stderr, 2, 2)
-        runner.run(hmmpfamOutputParsingTestSuite)
-
-
-if __name__ == '__main__':
-    main()
\ No newline at end of file
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/pyRepetUnit/align/transformAACoordIntoNtCoord/TransformAACoordIntoNtCoordInAlignFormat.py
--- a/commons/pyRepetUnit/align/transformAACoordIntoNtCoord/TransformAACoordIntoNtCoordInAlignFormat.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,133 +0,0 @@
-import os
-import sys
-from commons.pyRepetUnit.align.AlignListUtils import AlignListUtils
-from commons.core.seq.BioseqUtils import BioseqUtils
-from commons.core.checker.RepetException import RepetException
-
-### Transform amino acid query coord in an align format to nucleotide coord 
-### according to the frame specified at the end of seqName
-#
-class TransformAACoordIntoNtCoordInAlignFormat( object ):
-    
-    def __init__(self):
-        self._inFileName = None
-        self._clean = False
-        self._outFileName = None
-        self._consensusFileName = None
-        self._IsFiltered = True
-
-    ## read input file, transform it and write the output file
-    # 
-    def run(self):   
-        alignUtils = AlignListUtils()         
-        listAlignInstance = alignUtils.read(self._inFileName)
-        self.transformQueryCoord(listAlignInstance)
-        #self.getOriginalQueryNameForAlignList(listAlignInstance)
-        if self._IsFiltered:
-            alignUtils.filterOnAMinimalScore(listAlignInstance, 0)
-        alignUtils.write(listAlignInstance, self._outFileName)
-        if self._clean:
-            self.clean()
-    
-    ## Transform the amino acid query coord into nucleotides and switch subject coord if the strand is reversed
-    # @param listAlignInstance list of align object instance
-    #
-    def transformQueryCoord(self, listAlignInstance):
-        bioseqList = BioseqUtils.extractBioseqListFromFastaFile( self._consensusFileName )
-        for alignInstance in listAlignInstance.getList():
-            try:
-                frame = self.extractFrameFromSeqName(alignInstance)
-            except RepetException, e:
-                raise e
-            previousEnd = alignInstance.range_query.end                            
-            previousStart = alignInstance.range_query.start
-            alignInstance.range_query.seqname = self._getOriginalQueryNameForAlignInstance(alignInstance)
-            if frame < 4:
-                self._changeStartInAAIntoNtInPositiveFrame(alignInstance, frame, previousStart) 
-                self._changeEndInAAIntoNtInPositiveFrame(alignInstance, frame, previousEnd)                
-            else:
-                self._checkIfSeqNameIsInDNASeqFile(bioseqList, alignInstance.range_query.seqname)
-                consensusLength = BioseqUtils.getSeqLengthWithSeqName(bioseqList, alignInstance.range_query.seqname)              
-                self._changeStartInAAIntoNtInNegativeFrame(alignInstance, frame, consensusLength, previousEnd)
-                self._changeEndInAAIntoNtInNegativeFrame(alignInstance, frame, consensusLength, previousStart)
-                self._invertedSubjectCoord(alignInstance)
-    
-    ## remove the input file
-    #
-    def clean(self):
-        os.remove(self._inFileName)
-        
-    ## set input file name
-    #
-    # @param fileName string name of file
-    #
-    def setInFileName(self, fileName):  
-        self._inFileName = fileName  
-    
-    ## set output file name
-    #
-    # @param fileName string name of file
-    #
-    def setOutFileName(self, fileName):  
-        self._outFileName = fileName    
-        
-    ## set consensus file name
-    #
-    # @param fileName string name of file
-    #
-    def setConsensusFileName(self, fileName):  
-        self._consensusFileName = fileName     
-    
-    ## set is clean will be done
-    #
-    # @param clean boolean clean
-    #
-    def setIsClean(self, clean):
-        self._clean = clean
-        
-    ## get input file name
-    #
-    def getInFileName(self):
-        return self._inFileName
-    
-    ## set is negativ score filter will be done
-    #
-    # @param isFiltered boolean isFiltered
-    #
-    def setIsFiltered(self, isFiltered):
-        self._IsFiltered = isFiltered
-
-    def _getOriginalQueryNameForAlignInstance(self, alignInstance):
-        return alignInstance.range_query.seqname[0:len(alignInstance.range_query.seqname) - 2]
-
-    def _invertedSubjectCoord(self, alignInstance):
-        return alignInstance.range_subject.reverse()
-
-    def _changeEndInAAIntoNtInPositiveFrame(self, alignInstance, frame, previousEnd):
-        alignInstance.range_query.end = 3 * previousEnd + frame - 1
-
-    def _changeStartInAAIntoNtInPositiveFrame(self, alignInstance, frame, previousStart):
-        alignInstance.range_query.start = 3 * (previousStart - 1) + frame
-    
-    def _changeEndInAAIntoNtInNegativeFrame(self, alignInstance, frame, consensusLength, previousStart):
-        alignInstance.range_query.end = consensusLength - 3 * (previousStart - 1) - frame + 4
-
-    def _changeStartInAAIntoNtInNegativeFrame(self, alignInstance, frame, consensusLength, previousEnd):
-        alignInstance.range_query.start = consensusLength - 3 * (previousEnd - 1) - frame + 2
-
-    def extractFrameFromSeqName(self, alignInstance):
-        try:
-            frame = int(alignInstance.range_query.seqname[len(alignInstance.range_query.seqname) - 1])
-        except ValueError:
-            raise RepetException("Unable to extract frame from sequence name")
-        return frame
-
-    def _checkIfSeqNameIsInDNASeqFile(self, bioseqList, seqName):
-        isSeqNameInBioseqList = False
-        for bioseq in bioseqList:
-            if seqName == bioseq.header:
-                isSeqNameInBioseqList = True
-        if not isSeqNameInBioseqList:
-            sys.stderr.write("seqName : " + seqName + " is not in the consensus file " + self._consensusFileName + "\n")
-            sys.exit(1)
-    
\ No newline at end of file
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/pyRepetUnit/align/transformAACoordIntoNtCoord/tests/Test_F_TransformAACoordIntoNtCoordAndScoreFiltering.py
--- a/commons/pyRepetUnit/align/transformAACoordIntoNtCoord/tests/Test_F_TransformAACoordIntoNtCoordAndScoreFiltering.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,38 +0,0 @@
-import os
-import unittest
-from commons.pyRepetUnit.align.transformAACoordIntoNtCoord.TransformAACoordIntoNtCoordInAlignFormat import TransformAACoordIntoNtCoordInAlignFormat
-from commons.core.utils.FileUtils import FileUtils
-
-class Test_F_TransformAACoordIntoNtCoordAndScoreFiltering (unittest.TestCase):
-    
-    def setUp(self):
-        self._inputFile = "./datas/OutputHmmpfamTest.align"
-        self._consensusFile = "./datas/ConsensusTestFile_nt.fsa"
-        self._outputFile = "./datas/alignTransformedToTest.align"
-        self._expectedFile = "./datas/PostPostProcessTest.align"
-        self._expectedFileFiltered = "./datas/PostPostProcessTestFiltered.align"
-        self._alignTransformation = TransformAACoordIntoNtCoordInAlignFormat()
-    
-    def testRun_with_no_filter(self):
-        self._alignTransformation.setInFileName(self._inputFile)
-        self._alignTransformation.setOutFileName(self._outputFile)
-        self._alignTransformation.setConsensusFileName(self._consensusFile)       
-        self._alignTransformation.setIsFiltered(False)
-        self._alignTransformation.run()
-        self.assertTrue(FileUtils.isRessourceExists(self._outputFile))
-        self.assertTrue(FileUtils.are2FilesIdentical(self._expectedFile, self._outputFile))
-        os.remove(self._outputFile) 
-        
-    def testRun_with_filter(self):
-        self._alignTransformation.setInFileName(self._inputFile)
-        self._alignTransformation.setOutFileName(self._outputFile)
-        self._alignTransformation.setConsensusFileName(self._consensusFile)       
-        self._alignTransformation.setIsFiltered(True)
-        self._alignTransformation.run()
-        self.assertTrue(FileUtils.isRessourceExists(self._outputFile))
-        self.assertTrue(FileUtils.are2FilesIdentical(self._expectedFileFiltered, self._outputFile))
-        os.remove(self._outputFile)
-        
-            
-if __name__ == "__main__" :
-    unittest.main() 
\ No newline at end of file
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/pyRepetUnit/align/transformAACoordIntoNtCoord/tests/Test_TransformAACoordIntoNtCoordInAlignFormat.py
--- a/commons/pyRepetUnit/align/transformAACoordIntoNtCoord/tests/Test_TransformAACoordIntoNtCoordInAlignFormat.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
b'@@ -1,237 +0,0 @@\n-import os\n-import unittest\n-from commons.pyRepetUnit.align.AlignListUtils import AlignListUtils\n-from commons.pyRepetUnit.align.transformAACoordIntoNtCoord.TransformAACoordIntoNtCoordInAlignFormat import TransformAACoordIntoNtCoordInAlignFormat\n-from commons.core.utils.FileUtils import FileUtils\n-from commons.core.coord.Align import Align\n-from commons.core.coord.Range import Range\n-from commons.core.checker.RepetException import RepetException\n-\n-class Test_TransformAACoordIntoNtCoordInAlignFormat(unittest.TestCase):\n-    \n-    def setUp(self):\n-        self.inputFileName = "alignFile.align"\n-        self.consensusFile = "consensus.fa"\n-        self.outputFileName = "outputFile.align"\n-        self._expFileName = "expFile.align"\n-        \n-    def tearDown(self):\n-        if FileUtils.isRessourceExists(self.inputFileName):\n-            os.remove(self.inputFileName)\n-        if FileUtils.isRessourceExists(self.consensusFile):\n-            os.remove(self.consensusFile)\n-        if FileUtils.isRessourceExists(self.outputFileName):\n-            os.remove(self.outputFileName)\n-        if FileUtils.isRessourceExists(self._expFileName):\n-            os.remove(self._expFileName)\n-    \n-    def test_transformQueryCoord(self):\n-        f = open(self.inputFileName, "w")\n-        f.write("blumeria_Grouper_590_20:NoCat_1\\t91\\t108\\tDUF234\\t5\\t22\\t1.5\\t3.2\\t0\\n")\n-        f.write("blumeria_Grouper_590_20:NoCat_1\\t111\\t119\\tDUF1414\\t1\\t9\\t6.3\\t2.9\\t0\\n")\n-        f.write("blumeria_Grouper_590_20:NoCat_3\\t30\\t37\\tCPW_WPC\\t1\\t9\\t7.7\\t1.5\\t0\\n")\n-        f.write("blumeria_Grouper_590_20:NoCat_3\\t55\\t69\\tHECT\\t341\\t355\\t9.2\\t0.0\\t0\\n")\n-        f.write("blumeria_Grouper_590_20:NoCat_4\\t82\\t91\\tDUF46\\t173\\t182\\t0.11\\t6.4\\t0\\n")\n-        f.write("blumeria_Grouper_590_20:NoCat_5\\t121\\t125\\tPOC4\\t276\\t280\\t6.3\\t-1.7\\t0\\n")\n-        f.close()\n-        f = open(self.consensusFile, "w")\n-        f.write(">blumeria_Grouper_590_20:NoCat\\n")\n-        f.write("TTTCGATCNTATTGAAATGTATAACCCACTACTTAGTTCGTGGACTTGTTGGTAGAGGGA\\n")\n-        f.write("AGCTTATGCAATAATGAAGGATAAAAGGATGTCAATTCGACTACTCTTCTAAACACAGAT\\n")\n-        f.write("ACCAGACTCCTTTTAATCCCAATAGATAGCCCGTGCGGGATCTCCTATTAACAGCAGTAA\\n")\n-        f.write("ACAACGCTAACACAGGGTATACGCAATCTCCGTTCGCCAAACACCAGTCTGTCGGGACTA\\n")\n-        f.write("CTAATTATCGAGCCTAGTAGGATCGACAATGTGTATCCCAACATAGAAATAATAGAAAGC\\n")\n-        f.write("TCAACACCCAAACCCCTCATCAATAACTGCCATTAATCATCACCTGACTTATCTCTGTAC\\n")\n-        f.write("TCCATAATTTCAACACTNAAGAATATTTGTA")\n-        f.close() \n-        alignRead = AlignListUtils()      \n-        tableauAlignInstance = alignRead.read(self.inputFileName)\n-        alignTransformation = TransformAACoordIntoNtCoordInAlignFormat()\n-        alignTransformation.setConsensusFileName(self.consensusFile)\n-        alignTransformation.transformQueryCoord(tableauAlignInstance)\n-        #check query coord\n-        self.assertEquals(tableauAlignInstance.get(0).range_query.start, 271)\n-        self.assertEquals(tableauAlignInstance.get(0).range_query.end, 324) \n-        self.assertEquals(tableauAlignInstance.get(1).range_query.start, 331)\n-        self.assertEquals(tableauAlignInstance.get(1).range_query.end, 357) \n-        self.assertEquals(tableauAlignInstance.get(2).range_query.start, 90)\n-        self.assertEquals(tableauAlignInstance.get(2).range_query.end, 113) \n-        self.assertEquals(tableauAlignInstance.get(3).range_query.start, 165)\n-        self.assertEquals(tableauAlignInstance.get(3).range_query.end, 209) \n-        self.assertEquals(tableauAlignInstance.get(4).range_query.start, 119)\n-        self.assertEquals(tableauAlignInstance.get(4).range_query.end, 148) \n-        self.assertEquals(tableauAlignInstance.get(5).range_query.start, 16)\n-        self.assertEquals(tableauAlignInstance.get(5).range_query.end, 30) \n-        #check subject (profiles) coord\n-        #positive frame : they don\'t change\n-        self.assertEquals(tableauAlignInstance.get(0).range_subject.start, 5)\n-    '..b'nTransformation = TransformAACoordIntoNtCoordInAlignFormat()\n-        self.assertRaises(RepetException, alignTransformation.extractFrameFromSeqName, alignInstance)\n-        \n-    def test_run_no_filter(self):\n-        f = open(self.inputFileName, "w")\n-        f.write("blumeria_Grouper_590_20:NoCat_1\\t91\\t108\\tDUF234\\t5\\t22\\t1.5\\t3.2\\t0\\n")\n-        f.write("blumeria_Grouper_590_20:NoCat_1\\t111\\t119\\tDUF1414\\t1\\t9\\t6.3\\t2.9\\t0\\n")\n-        f.write("blumeria_Grouper_590_20:NoCat_3\\t30\\t37\\tCPW_WPC\\t1\\t9\\t7.7\\t1.5\\t0\\n")\n-        f.write("blumeria_Grouper_590_20:NoCat_3\\t55\\t69\\tHECT\\t341\\t355\\t9.2\\t0.0\\t0\\n")\n-        f.write("blumeria_Grouper_590_20:NoCat_4\\t82\\t91\\tDUF46\\t173\\t182\\t0.11\\t6.4\\t0\\n")\n-        f.write("blumeria_Grouper_590_20:NoCat_5\\t121\\t125\\tPOC4\\t276\\t280\\t6.3\\t-1.7\\t0\\n")\n-        f.close()\n-        f = open(self.consensusFile, "w")\n-        f.write(">blumeria_Grouper_590_20:NoCat\\n")\n-        f.write("TTTCGATCNTATTGAAATGTATAACCCACTACTTAGTTCGTGGACTTGTTGGTAGAGGGA\\n")\n-        f.write("AGCTTATGCAATAATGAAGGATAAAAGGATGTCAATTCGACTACTCTTCTAAACACAGAT\\n")\n-        f.write("ACCAGACTCCTTTTAATCCCAATAGATAGCCCGTGCGGGATCTCCTATTAACAGCAGTAA\\n")\n-        f.write("ACAACGCTAACACAGGGTATACGCAATCTCCGTTCGCCAAACACCAGTCTGTCGGGACTA\\n")\n-        f.write("CTAATTATCGAGCCTAGTAGGATCGACAATGTGTATCCCAACATAGAAATAATAGAAAGC\\n")\n-        f.write("TCAACACCCAAACCCCTCATCAATAACTGCCATTAATCATCACCTGACTTATCTCTGTAC\\n")\n-        f.write("TCCATAATTTCAACACTNAAGAATATTTGTA")\n-        f.close() \n-        alignTransformation = TransformAACoordIntoNtCoordInAlignFormat()\n-        alignTransformation.setInFileName(self.inputFileName)\n-        alignTransformation.setOutFileName(self.outputFileName)\n-        alignTransformation.setConsensusFileName(self.consensusFile)\n-        alignTransformation.setIsFiltered(False)\n-        alignTransformation.run()\n-        self.assertTrue(FileUtils.getNbLinesInSingleFile(self.outputFileName), 6) \n-        self.assertTrue(FileUtils.isRessourceExists(self.inputFileName)) \n-    \n-    def test_run_no_filter_clean_option(self):\n-        f = open(self.inputFileName, "w")\n-        f.write("blumeria_Grouper_590_20:NoCat_1\\t91\\t108\\tDUF234\\t5\\t22\\t1.5\\t3.2\\t0\\n")\n-        f.write("blumeria_Grouper_590_20:NoCat_1\\t111\\t119\\tDUF1414\\t1\\t9\\t6.3\\t2.9\\t0\\n")\n-        f.write("blumeria_Grouper_590_20:NoCat_3\\t30\\t37\\tCPW_WPC\\t1\\t9\\t7.7\\t1.5\\t0\\n")\n-        f.write("blumeria_Grouper_590_20:NoCat_3\\t55\\t69\\tHECT\\t341\\t355\\t9.2\\t0.0\\t0\\n")\n-        f.write("blumeria_Grouper_590_20:NoCat_4\\t82\\t91\\tDUF46\\t173\\t182\\t0.11\\t6.4\\t0\\n")\n-        f.write("blumeria_Grouper_590_20:NoCat_5\\t121\\t125\\tPOC4\\t276\\t280\\t6.3\\t-1.7\\t0\\n")\n-        f.close()\n-        f = open(self.consensusFile, "w")\n-        f.write(">blumeria_Grouper_590_20:NoCat\\n")\n-        f.write("TTTCGATCNTATTGAAATGTATAACCCACTACTTAGTTCGTGGACTTGTTGGTAGAGGGA\\n")\n-        f.write("AGCTTATGCAATAATGAAGGATAAAAGGATGTCAATTCGACTACTCTTCTAAACACAGAT\\n")\n-        f.write("ACCAGACTCCTTTTAATCCCAATAGATAGCCCGTGCGGGATCTCCTATTAACAGCAGTAA\\n")\n-        f.write("ACAACGCTAACACAGGGTATACGCAATCTCCGTTCGCCAAACACCAGTCTGTCGGGACTA\\n")\n-        f.write("CTAATTATCGAGCCTAGTAGGATCGACAATGTGTATCCCAACATAGAAATAATAGAAAGC\\n")\n-        f.write("TCAACACCCAAACCCCTCATCAATAACTGCCATTAATCATCACCTGACTTATCTCTGTAC\\n")\n-        f.write("TCCATAATTTCAACACTNAAGAATATTTGTA")\n-        f.close() \n-        alignTransformation = TransformAACoordIntoNtCoordInAlignFormat()\n-        alignTransformation.setInFileName(self.inputFileName)\n-        alignTransformation.setOutFileName(self.outputFileName)\n-        alignTransformation.setConsensusFileName(self.consensusFile)\n-        alignTransformation.setIsFiltered(True)\n-        alignTransformation.setIsClean(True)\n-        alignTransformation.run()\n-        self.assertTrue(FileUtils.getNbLinesInSingleFile(self.outputFileName), 6) \n-        self.assertFalse(FileUtils.isRessourceExists(self.inputFileName))        \n-            \n-if __name__ == "__main__" :\n-    unittest.main() \n\\ No newline at end of file\n'
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/pyRepetUnit/align/transformAACoordIntoNtCoord/tests/TransformAACoordIntoNtCoordTestSuite.py
--- a/commons/pyRepetUnit/align/transformAACoordIntoNtCoord/tests/TransformAACoordIntoNtCoordTestSuite.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,17 +0,0 @@
-import unittest
-import sys
-import TestTransformAACoordIntoNtCoordInAlignFormat
-import TestAcceptanceTransformAACoordIntoNtCoordAndScoreFiltering
-
-def main():
-
-        TransformAlignTestSuite = unittest.TestSuite() 
-        TransformAlignTestSuite.addTest(unittest.makeSuite(TestTransformAACoordIntoNtCoordInAlignFormat.TestTransformAACoordIntoNtCoordInAlignFormat,'test'))
-        TransformAlignTestSuite.addTest(unittest.makeSuite(TestAcceptanceTransformAACoordIntoNtCoordAndScoreFiltering.TestAcceptanceTransformAACoordIntoNtCoordAndScoreFiltering,'test'))
-        
-        runner = unittest.TextTestRunner(sys.stderr, 2, 2)
-        runner.run(TransformAlignTestSuite)
-
-
-if __name__ == '__main__':
-    main()
\ No newline at end of file
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/pyRepetUnit/align/transformAACoordIntoNtCoord/tests/datas/ConsensusTestFile_nt.fsa
--- a/commons/pyRepetUnit/align/transformAACoordIntoNtCoord/tests/datas/ConsensusTestFile_nt.fsa Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,18 +0,0 @@
->blumeria_Grouper_590_20:NoCat
-TTTCGATCNTATTGAAATGTATAACCCACTACTTAGTTCGTGGACTTGTTGGTAGAGGGA
-AGCTTATGCAATAATGAAGGATAAAAGGATGTCAATTCGACTACTCTTCTAAACACAGAT
-ACCAGACTCCTTTTAATCCCAATAGATAGCCCGTGCGGGATCTCCTATTAACAGCAGTAA
-ACAACGCTAACACAGGGTATACGCAATCTCCGTTCGCCAAACACCAGTCTGTCGGGACTA
-CTAATTATCGAGCCTAGTAGGATCGACAATGTGTATCCCAACATAGAAATAATAGAAAGC
-TCAACACCCAAACCCCTCATCAATAACTGCCATTAATCATCACCTGACTTATCTCTGTAC
-TCCATAATTTCAACACTNAAGAATATTTGTA
->blumeria_Grouper_4152_12:NoCat
-GGACCGGCCGCCACGAATTGCGCGATTGCTGCTCGCAAGTAGACTTTGATGGAGTCTACA
-AAATTTTTGTCTTCACCGGTGGAGAGCGGTTGAAGAGCTGCCTCGACACTGCTAATAGCC
-GTCGAGCATATTGTGAATTGCGCGGCTTTTTGTCTTGCCCTGCGCTCCTCCGCTTCGATC
-GCTGCAAGCAATTCTGGAGGGTGTGTATTTTTTCTGCCTGCTGCTTCTAGTGCTGGAGGC
-TGCGGGGCCAGTGGAGGGTTTTCGGCTCCTGCTGCCTTAGTGGATGGTGTTTCAGCCCTT
-TTCGCGGGCCTCACTTCTGCAGGTCGCGGTAGTGCTGGAACCGTGATGCGCTTCTCGGGT
-GCGACGACGGTTTTTCTGGGGGATCCGGTGGGATCCAAGACTTGCTCTGCGTCTTCTGGG
-CTGGAGGATGCCCAAACTGAATCGGCGAGGGTTTTTAGCTTCTCGACTTCTGCGTCCACC
-ATATCTACCTCGGGGACATTG
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/pyRepetUnit/align/transformAACoordIntoNtCoord/tests/datas/OutputHmmpfamTest.align
--- a/commons/pyRepetUnit/align/transformAACoordIntoNtCoord/tests/datas/OutputHmmpfamTest.align Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,29 +0,0 @@
-blumeria_Grouper_590_20:NoCat_1 91 108 DUF234 5 22 1.5 3.2 0
-blumeria_Grouper_590_20:NoCat_1 111 119 DUF1414 1 9 6.3 2.9 0
-blumeria_Grouper_590_20:NoCat_3 30 37 CPW_WPC 1 9 7.7 1.5 0
-blumeria_Grouper_590_20:NoCat_3 55 69 HECT 341 355 9.2 0.0 0
-blumeria_Grouper_590_20:NoCat_4 82 91 DUF46 173 182 0.11 6.4 0
-blumeria_Grouper_590_20:NoCat_5 121 125 POC4 276 280 6.3 -1.7 0
-blumeria_Grouper_4152_12:NoCat_1 27 38 Amino_oxidase 471 482 9.1 -0.6 0
-blumeria_Grouper_4152_12:NoCat_1 33 67 TrbL 231 285 8 0.8 0
-blumeria_Grouper_4152_12:NoCat_1 58 80 TNV_CP 167 189 7.9 0.1 0
-blumeria_Grouper_4152_12:NoCat_1 94 109 DGOK 283 298 1.3 0.5 0
-blumeria_Grouper_4152_12:NoCat_1 113 127 Peptidase_S29 1 15 1.1 4.7 0
-blumeria_Grouper_4152_12:NoCat_1 148 157 DUF1301 1 10 9.9 0.4 0
-blumeria_Grouper_4152_12:NoCat_2 21 26 Toxin_18 50 55 4.4 4.2 0
-blumeria_Grouper_4152_12:NoCat_2 126 137 ABC_transp_aux 276 287 5.2 1.1 0
-blumeria_Grouper_4152_12:NoCat_2 143 159 DUF1602 23 39 0.39 5.0 0
-blumeria_Grouper_4152_12:NoCat_3 102 122 zf-P11 1 20 1.8 3.6 0
-blumeria_Grouper_4152_12:NoCat_3 126 135 V-ATPase_G 1 10 5.3 2.4 0
-blumeria_Grouper_4152_12:NoCat_4 92 122 XhoI 172 202 0.014 9.9 0
-blumeria_Grouper_4152_12:NoCat_4 113 119 Endomucin 261 267 6 0.1 0
-blumeria_Grouper_4152_12:NoCat_5 2 19 DUF1798 35 52 3.3 3.0 0
-blumeria_Grouper_4152_12:NoCat_5 46 69 DUF881 214 237 1.6 4.0 0
-blumeria_Grouper_4152_12:NoCat_5 77 93 Jun 264 284 6.5 -0.7 0
-blumeria_Grouper_4152_12:NoCat_5 89 108 SLT 1 20 1.2 4.5 0
-blumeria_Grouper_4152_12:NoCat_5 93 115 DUF2346 63 85 2.8 3.2 0
-blumeria_Grouper_4152_12:NoCat_5 124 139 LBP_BPI_CETP 191 209 3.8 1.8 0
-blumeria_Grouper_4152_12:NoCat_6 50 62 DUF258 293 305 3.8 1.5 0
-blumeria_Grouper_4152_12:NoCat_6 85 90 SOCS_box 1 6 9.7 2.4 0
-blumeria_Grouper_4152_12:NoCat_6 95 115 DUF1289 36 56 5.3 2.8 0
-blumeria_Grouper_4152_12:NoCat_6 106 116 TRAP_alpha 317 327 4.1 0.1 0
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/pyRepetUnit/align/transformAACoordIntoNtCoord/tests/datas/PostPostProcessTest.align
--- a/commons/pyRepetUnit/align/transformAACoordIntoNtCoord/tests/datas/PostPostProcessTest.align Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,29 +0,0 @@
-blumeria_Grouper_590_20:NoCat 271 324 DUF234 5 22 1.5 3 0.000000
-blumeria_Grouper_590_20:NoCat 331 357 DUF1414 1 9 6.3 2 0.000000
-blumeria_Grouper_590_20:NoCat 90 113 CPW_WPC 1 9 7.7 1 0.000000
-blumeria_Grouper_590_20:NoCat 165 209 HECT 341 355 9.2 0 0.000000
-blumeria_Grouper_590_20:NoCat 119 148 DUF46 182 173 0.11 6 0.000000
-blumeria_Grouper_590_20:NoCat 16 30 POC4 280 276 6.3 -1 0.000000
-blumeria_Grouper_4152_12:NoCat 79 114 Amino_oxidase 471 482 9.1 0 0.000000
-blumeria_Grouper_4152_12:NoCat 97 201 TrbL 231 285 8 0 0.000000
-blumeria_Grouper_4152_12:NoCat 172 240 TNV_CP 167 189 7.9 0 0.000000
-blumeria_Grouper_4152_12:NoCat 280 327 DGOK 283 298 1.3 0 0.000000
-blumeria_Grouper_4152_12:NoCat 337 381 Peptidase_S29 1 15 1.1 4 0.000000
-blumeria_Grouper_4152_12:NoCat 442 471 DUF1301 1 10 9.9 0 0.000000
-blumeria_Grouper_4152_12:NoCat 62 79 Toxin_18 50 55 4.4 4 0.000000
-blumeria_Grouper_4152_12:NoCat 377 412 ABC_transp_aux 276 287 5.2 1 0.000000
-blumeria_Grouper_4152_12:NoCat 428 478 DUF1602 23 39 0.39 5 0.000000
-blumeria_Grouper_4152_12:NoCat 306 368 zf-P11 1 20 1.8 3 0.000000
-blumeria_Grouper_4152_12:NoCat 378 407 V-ATPase_G 1 10 5.3 2 0.000000
-blumeria_Grouper_4152_12:NoCat 136 228 XhoI 202 172 0.014 9 0.000000
-blumeria_Grouper_4152_12:NoCat 145 165 Endomucin 267 261 6 0 0.000000
-blumeria_Grouper_4152_12:NoCat 444 497 DUF1798 52 35 3.3 3 0.000000
-blumeria_Grouper_4152_12:NoCat 294 365 DUF881 237 214 1.6 4 0.000000
-blumeria_Grouper_4152_12:NoCat 222 272 Jun 284 264 6.5 0 0.000000
-blumeria_Grouper_4152_12:NoCat 177 236 SLT 20 1 1.2 4 0.000000
-blumeria_Grouper_4152_12:NoCat 156 224 DUF2346 85 63 2.8 3 0.000000
-blumeria_Grouper_4152_12:NoCat 84 131 LBP_BPI_CETP 209 191 3.8 1 0.000000
-blumeria_Grouper_4152_12:NoCat 314 352 DUF258 305 293 3.8 1 0.000000
-blumeria_Grouper_4152_12:NoCat 230 247 SOCS_box 6 1 9.7 2 0.000000
-blumeria_Grouper_4152_12:NoCat 155 217 DUF1289 56 36 5.3 2 0.000000
-blumeria_Grouper_4152_12:NoCat 152 184 TRAP_alpha 327 317 4.1 0 0.000000
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/pyRepetUnit/align/transformAACoordIntoNtCoord/tests/datas/PostPostProcessTestFiltered.align
--- a/commons/pyRepetUnit/align/transformAACoordIntoNtCoord/tests/datas/PostPostProcessTestFiltered.align Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,25 +0,0 @@
-blumeria_Grouper_590_20:NoCat 271 324 DUF234 5 22 1.5 3 0.000000
-blumeria_Grouper_590_20:NoCat 331 357 DUF1414 1 9 6.3 2 0.000000
-blumeria_Grouper_590_20:NoCat 90 113 CPW_WPC 1 9 7.7 1 0.000000
-blumeria_Grouper_590_20:NoCat 119 148 DUF46 182 173 0.11 6 0.000000
-blumeria_Grouper_4152_12:NoCat 97 201 TrbL 231 285 8 0 0.000000
-blumeria_Grouper_4152_12:NoCat 172 240 TNV_CP 167 189 7.9 0 0.000000
-blumeria_Grouper_4152_12:NoCat 280 327 DGOK 283 298 1.3 0 0.000000
-blumeria_Grouper_4152_12:NoCat 337 381 Peptidase_S29 1 15 1.1 4 0.000000
-blumeria_Grouper_4152_12:NoCat 442 471 DUF1301 1 10 9.9 0 0.000000
-blumeria_Grouper_4152_12:NoCat 62 79 Toxin_18 50 55 4.4 4 0.000000
-blumeria_Grouper_4152_12:NoCat 377 412 ABC_transp_aux 276 287 5.2 1 0.000000
-blumeria_Grouper_4152_12:NoCat 428 478 DUF1602 23 39 0.39 5 0.000000
-blumeria_Grouper_4152_12:NoCat 306 368 zf-P11 1 20 1.8 3 0.000000
-blumeria_Grouper_4152_12:NoCat 378 407 V-ATPase_G 1 10 5.3 2 0.000000
-blumeria_Grouper_4152_12:NoCat 136 228 XhoI 202 172 0.014 9 0.000000
-blumeria_Grouper_4152_12:NoCat 145 165 Endomucin 267 261 6 0 0.000000
-blumeria_Grouper_4152_12:NoCat 444 497 DUF1798 52 35 3.3 3 0.000000
-blumeria_Grouper_4152_12:NoCat 294 365 DUF881 237 214 1.6 4 0.000000
-blumeria_Grouper_4152_12:NoCat 177 236 SLT 20 1 1.2 4 0.000000
-blumeria_Grouper_4152_12:NoCat 156 224 DUF2346 85 63 2.8 3 0.000000
-blumeria_Grouper_4152_12:NoCat 84 131 LBP_BPI_CETP 209 191 3.8 1 0.000000
-blumeria_Grouper_4152_12:NoCat 314 352 DUF258 305 293 3.8 1 0.000000
-blumeria_Grouper_4152_12:NoCat 230 247 SOCS_box 6 1 9.7 2 0.000000
-blumeria_Grouper_4152_12:NoCat 155 217 DUF1289 56 36 5.3 2 0.000000
-blumeria_Grouper_4152_12:NoCat 152 184 TRAP_alpha 327 317 4.1 0 0.000000
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/pyRepetUnit/blastnForClassifierStep1/RepbaseBLRnForClassifierStep1.py
--- a/commons/pyRepetUnit/blastnForClassifierStep1/RepbaseBLRnForClassifierStep1.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
b'@@ -1,186 +0,0 @@\n-"""\n-Launch Blaster and then Matcher to compare the input sequences with known TEs via blastn and record the results into a MySQL table.\n-"""\n-\n-import os\n-import ConfigParser\n-from commons.core.utils.FileUtils import FileUtils\n-from commons.core.LoggerFactory import LoggerFactory\n-\n-LOG_DEPTH = "repet.tools"\n-\n-class RepbaseBLRnForClassifierStep1( object ):\n-    \n-    """\n-    Launch Blaster and then Matcher to compare the input sequences with known TEs via blastn and record the results into a MySQL table.\n-    \n-    @param inFileName: name of the input fasta file\n-    @type inFileName: string\n-    \n-    @param launch_1: generic command at the beginning of a specific command\n-    @type launch_1: string\n-    \n-    @param launch_2: generic command at the end of a specific command\n-    @type launch_2: string\n-\n-    @return: all the commands to run the job\n-    @rtype: string\n-    \n-    @param cDir: current directory (where to retrieve the result files)\n-    @ype cDir: string\n-\n-    @param tmpDir: temporary directory (where the job will run)\n-    @type tmpDir: string\n-    \n-    @param configFileName: configuration file name\n-    @type configFileName: string\n-    \n-    @param logger: a logger Instance\n-    @type logger: logger\n-    \n-    @param verbose: verbose(0/1/2)\n-    @type verbose: int\n-    \n-    @param pL: program launcher\n-    @type pL: programLauncher Instance\n-    \n-    @param project: project name\n-    @type project: string\n-    \n-    """\n-\n-    def __init__(self, inFileName, launch_1, launch_2, cDir, tmpDir, configFileName, verbose, pL, project):\n-        """\n-        Constructor\n-        """\n-        self._inFileName = inFileName\n-        self._launch_1 = launch_1\n-        self._launch_2 = launch_2\n-        self._cDir = cDir\n-        self._tmpDir = tmpDir\n-        self._verbose = verbose\n-        self._pL = pL\n-        self._project = project\n-        self._fileUtils = FileUtils()\n-        self._config = ConfigParser.ConfigParser()\n-        self._configFileName = configFileName\n-        self._config.readfp( open(self._configFileName) )\n-        self._bank = self._config.get("detect_features","TE_nucl_bank")\n-        self._log = LoggerFactory.createLogger("%s.%s" % (LOG_DEPTH, self.__class__.__name__), self._verbose)\n-\n-    def formatRepbase_ntIfNecessary( self ):\n-        """\n-        Format Repbase (make \'cut\' files).\n-        """\n-        if not os.path.exists( "%s_cut" % ( self._bank ) ):\n-            self._log.debug("prepare bank \'%s\'..." % ( self._bank ))\n-            prg = os.environ["REPET_PATH"] + "/bin/blaster"\n-            cmd = prg\n-            cmd += " -s %s" % ( self._bank )\n-            cmd += " -n blastn"\n-            if self._config.get("detect_features","wublast") == "yes":\n-                cmd += " -W"\n-            cmd += " -r"\n-            cmd += " -P"\n-            self._pL.launch( prg, cmd )\n-            os.system( "rm -f %s-blastn-*.param" % ( self._bank ) )\n-        \n-    def createCmdToLaunch( self ):\n-        cmd = self._launch_1 + os.environ["REPET_PATH"] + "/bin/blaster"\n-        cmd += " -q %s" % ( self._inFileName )\n-        cmd += " -s %s/%s" % ( self._cDir, self._bank )\n-        cmd += " -B %s_BLRn_%s" % ( self._inFileName, self._bank )\n-        cmd += " -n blastn"\n-        if self._config.get("detect_features","wublast") == "yes":\n-            cmd += " -W"\n-        cmd += " -r"\n-        cmd += " -v 1"\n-        cmd += self._launch_2\n-    \n-        cmd += "if not os.path.exists( \\"%s/%s_BLRn_%s.param\\" ):\\n" % ( self._cDir, self._inFileName, self._bank )\n-        cmd += "\\tos.system( \\"mv %s_BLRn_%s.param %s\\" )\\n" % ( self._inFileName, self._bank, self._cDir )\n-        cmd += "if os.path.exists( \\"%s_cut\\" ):\\n" % ( self._inFileName )\n-        cmd += "\\tos.system( \\"rm -f %s_cut*\\" )\\n" % ( self._inFileName )\n-        cmd += "if os.path.exists( \\"%s.Nstretch.map\\" ):\\n" % ( self._inFileName )\n-        cmd += "\\tos.remove( \\"%s.Nstretch.map\\" )\\n" % ( self._inFileName )'..b'%s.align" % ( self._inFileName, self._bank )\n-        cmd += " -q %s" % ( self._inFileName )\n-        cmd += " -s %s/%s" % ( self._cDir, self._bank )\n-        cmd += " -j"\n-        cmd += " -v 1"\n-        cmd += self._launch_2\n-    \n-        cmd += "if not os.path.exists( \\"%s/%s_BLRn_%s.align.clean_match.path\\" ):\\n" % ( self._cDir, self._inFileName, self._bank )\n-        cmd += "\\tos.system( \\"mv %s_BLRn_%s.align.clean_match.path %s\\" )\\n" % ( self._inFileName, self._bank, self._cDir )\n-        cmd += "if not os.path.exists( \\"%s/%s_BLRn_%s.align.clean_match.param\\" ):\\n" % ( self._cDir, self._inFileName, self._bank )\n-        cmd += "\\tos.system( \\"mv %s_BLRn_%s.align.clean_match.param %s\\" )\\n" % ( self._inFileName, self._bank, self._cDir )\n-        cmd += "if os.path.exists( \\"%s_BLRn_%s.align\\" ):\\n" % ( self._inFileName, self._bank )\n-        cmd += "\\tos.remove( \\"%s_BLRn_%s.align\\" )\\n" % ( self._inFileName, self._bank )\n-        cmd += "if os.path.exists( \\"%s_BLRn_%s.align.clean_match.fa\\" ):\\n" % ( self._inFileName, self._bank )\n-        cmd += "\\tos.remove( \\"%s_BLRn_%s.align.clean_match.fa\\" )\\n" % ( self._inFileName, self._bank )\n-        cmd += "if os.path.exists( \\"%s_BLRn_%s.align.clean_match.map\\" ):\\n" % ( self._inFileName, self._bank )\n-        cmd += "\\tos.remove( \\"%s_BLRn_%s.align.clean_match.map\\" )\\n" % ( self._inFileName, self._bank )\n-        cmd += "if os.path.exists( \\"%s_BLRn_%s.align.clean_match.tab\\" ):\\n" % ( self._inFileName, self._bank )\n-        cmd += "\\tos.remove( \\"%s_BLRn_%s.align.clean_match.tab\\" )\\n" % ( self._inFileName, self._bank )\n-    \n-        if self._tmpDir != self._cDir:\n-            cmd += "if os.path.exists( \\"%s\\" ):\\n" % ( self._bank )\n-            cmd += "\\tos.remove( \\"%s\\" )\\n" % ( self._bank )\n-            \n-        return cmd\n-    \n-    def collectRepbaseBLRn( self ):\n-        """\n-        Concatenate the outputs of blastn, adapt the ID and load the results into a table.\n-        """\n-        bankFull = self._bank\n-        bankPath, bank = os.path.split( bankFull )\n-        self._concatPathFile(bank)\n-        self._adaptIDInPathFile(bank)\n-        self._loadPathFileInTable(bank)    \n-        self._findAndRemoveUselessFiles(bank)\n-        \n-    def _concatPathFile(self, bank):\n-        FileUtils.catFilesByPattern("../batch_*.fa_BLRn_%s.align.clean_match.path" % bank,\n-                                        "%s_BLRn_%s.align.clean_match.path.tmp" % (self._project, bank))\n-\n-    def _adaptIDInPathFile(self, bank):\n-        if os.path.exists(os.environ["REPET_PATH"] + "/bin/pathnum2id"):\n-            prg = os.environ["REPET_PATH"] + "/bin/pathnum2id"\n-            cmd = prg\n-            cmd += " -i %s_BLRn_%s.align.clean_match.path.tmp" % (self._project, bank)\n-            cmd += " -o %s_BLRn_%s.align.clean_match.path" % (self._project, bank)\n-            cmd += " -v %i" % (self._verbose - 1)\n-            self._pL.launch(prg, cmd)\n-        else:\n-            prg = os.environ["REPET_PATH"] + "/bin/pathnum2id.py"\n-            cmd = prg\n-            cmd += " -i %s_BLRn_%s.align.clean_match.path.tmp" % (self._project, bank)\n-            cmd += " -o %s_BLRn_%s.align.clean_match.path" % (self._project, bank)\n-            self._pL.launch(prg, cmd)\n-\n-    def _loadPathFileInTable(self, bank):\n-        prg = os.environ["REPET_PATH"] + "/bin/srptCreateTable.py"\n-        cmd = prg\n-        cmd += " -f %s_BLRn_%s.align.clean_match.path" % (self._project, bank)\n-        cmd += " -n %s_TE_BLRn_path" % (self._project)\n-        cmd += " -t path"\n-        cmd += " -c ../%s" % (self._configFileName)\n-        self._pL.launch(prg, cmd)\n-\n-    def _findAndRemoveUselessFiles(self, bank):\n-        prg = "find"\n-        cmd = prg\n-        cmd += " .. -name \\"batch_*.fa_BLRn_%s.*\\" -exec rm {} \\;" % (bank)\n-        self._pL.launch(prg, cmd)\n-        prg = "rm"\n-        cmd = prg\n-        cmd += " %s_BLRn_%s.align.clean_match.path.tmp" % (self._project, bank)\n-        self._pL.launch(prg, cmd)\n'
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/pyRepetUnit/blastnForClassifierStep1/tests/Test_RepbaseBLRnForClassifierStep1.py
--- a/commons/pyRepetUnit/blastnForClassifierStep1/tests/Test_RepbaseBLRnForClassifierStep1.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
b'@@ -1,343 +0,0 @@\n-import unittest\n-import os\n-import shutil\n-import ConfigParser\n-import sys\n-from commons.pyRepetUnit.blastnForClassifierStep1.RepbaseBLRnForClassifierStep1 import RepbaseBLRnForClassifierStep1\n-from commons.core.utils.FileUtils import FileUtils\n-from commons.core.sql.DbFactory import DbFactory\n-from commons.core.sql.TablePathAdaptator import TablePathAdaptator\n-from commons.core.coord.Path import Path\n-import pyRepet.launcher.programLauncher\n-\n-if not os.environ.has_key( "REPET_PATH" ):\n-    print "*** Error: no environment variable REPET_PATH"\n-    sys.exit(1)\n-sys.path.append( os.environ["REPET_PATH"] )\n-\n-NB_EXPECTED_LINES_IN_PATH_FILE = 10\n-CURRENT_DIR = os.getcwd()\n-\n-\n-class Test_RepbaseBLRnForClassifierStep1( unittest.TestCase ):\n-    \n-    \n-    def setUp( self ):\n-        os.chdir(CURRENT_DIR)\n-        self._inFileName = "dummyFileName"\n-        self._launch_1 = "log = os.system( \\""\n-        self._launch_2 = "\\" )\\n"\n-        self._launch_2 += "if log != 0:\\n"\n-        self._launch_2 += "\\tsys.exit(1)\\n"\n-        self._cDir = "/home/user/dummy_cdir"\n-        self._tmpDir = "/home/user/dummy_tmpDir"\n-        self._configFileName = "configFile"\n-        self._repbaseName = "dummyRepbase_nt.fa"\n-        f = open(self._configFileName, "w")\n-        f.write("[repet_env]\\n")\n-        f.write("repet_host: %s\\n" % os.environ["REPET_HOST"])\n-        f.write("repet_user: %s\\n" % os.environ["REPET_USER"])\n-        f.write("repet_pw: %s\\n" % os.environ["REPET_PW"])\n-        f.write("repet_db: %s\\n" % os.environ["REPET_DB"])\n-        f.write("repet_port: %s\\n" % os.environ["REPET_PORT"])\n-        f.write("[detect_features]\\n")\n-        f.write("TE_BLRn: yes\\n")\n-        f.write("TE_nucl_bank: %s\\n" % self._repbaseName)\n-        f.write("wublast: yes\\n")\n-        f.close()\n-        self._verbose = 0\n-        self._config = ConfigParser.ConfigParser()\n-        self._config.readfp( open(self._configFileName) )\n-        self._pL = pyRepet.launcher.programLauncher.programLauncher()\n-        self._project = "dummyProject"\n-        self._repbaseBLRn = RepbaseBLRnForClassifierStep1(self._inFileName, self._launch_1, self._launch_2, self._cDir, self._tmpDir, self._configFileName, self._verbose, self._pL, self._project)\n-        self._expFileName = "expFile"\n-        self._bank = self._config.get("detect_features","TE_nucl_bank")\n-        self._db = DbFactory.createInstance()\n-        \n-        \n-    def tearDown( self ):\n-        self._db.dropTable("%s_TE_BLRn_path" % (self._project))\n-        os.chdir(CURRENT_DIR)\n-        self._repbaseBLRn = None\n-        os.remove(self._configFileName)\n-        if os.path.isfile("%s_BLRn_%s.align.clean_match.path" % (self._project, self._bank)):\n-            os.remove("%s_BLRn_%s.align.clean_match.path" % (self._project, self._bank))\n-        if os.path.isfile("%s_BLRn_%s.align.clean_match.path.tmp" % (self._project, self._bank)):\n-            os.remove("%s_BLRn_%s.align.clean_match.path.tmp" % (self._project, self._bank))\n-        if os.path.isfile("batch_1.fa_BLRn_%s.*" % (self._bank)):\n-            os.remove("batch_1.fa_BLRn_%s.*" % (self._bank))\n-        if os.path.isfile("batch_2.fa_BLRn_%s.*" % (self._bank)):\n-            os.remove("batch_2.fa_BLRn_%s.*" % (self._bank))\n-        if os.path.isfile("batch_1.fa_BLRn_%s.align.clean_match.path" % (self._bank)):\n-            os.remove("batch_1.fa_BLRn_%s.align.clean_match.path" % (self._bank))\n-        if os.path.isfile("batch_2.fa_BLRn_%s.align.clean_match.path" % (self._bank)):\n-            os.remove("batch_2.fa_BLRn_%s.align.clean_match.path" % (self._bank))\n-        if os.path.isfile(self._repbaseName):\n-            os.remove(self._repbaseName)\n-            os.remove(self._repbaseName + "_cut")\n-            os.remove(self._repbaseName + "_cut.xnd")\n-            os.remove(self._repbaseName + "_cut.xns")\n-            os.remove(self._repbaseName + "_cut.xnt")\n-            os.remove(self._repbaseName + ".Nstretch.map")\n-            o'..b'FromFilePathList = self._readPathResultsFromFileAndFillList()\n-        resultFromTablePathList = self._readPathResultsFromTableAndFillList() \n-        self.assertEquals(resultFromFilePathList, resultFromTablePathList)\n-        \n-        \n-    def test_findAndRemoveUselessFiles( self ):\n-        self._createFile("%s_BLRn_%s.align.clean_match.path.tmp" % (self._project, self._bank))\n-        self._createFile("batch_1.fa_BLRn_%s.*" % (self._bank))\n-        self._createFile("batch_2.fa_BLRn_%s.*" % (self._bank))\n-        self._repbaseBLRn._findAndRemoveUselessFiles(self._bank)\n-        self.assertFalse(FileUtils.isRessourceExists("%s_BLRn_%s.align.clean_match.path.tmp" % (self._project, self._bank)))\n-        self.assertFalse(FileUtils.isRessourceExists("batch_1.fa_BLRn_%s.*" % (self._bank)))\n-        self.assertFalse(FileUtils.isRessourceExists("batch_2.fa_BLRn_%s.*" % (self._bank)))\n-        \n-        \n-    def test_collectRepbaseBLRn( self ):\n-        os.chdir(CURRENT_DIR)\n-        if not FileUtils.isRessourceExists("TE_BLRn"):\n-            os.mkdir( "TE_BLRn" )\n-        self._createPathFiles(self._bank)\n-        os.chdir( "TE_BLRn" )\n-        self._repbaseBLRn.collectRepbaseBLRn()  \n-        self.assertTrue(FileUtils.isRessourceExists("%s_BLRn_%s.align.clean_match.path" % ( self._project, self._bank )))\n-        self.assertEquals(NB_EXPECTED_LINES_IN_PATH_FILE, FileUtils.getNbLinesInSingleFile("%s_BLRn_%s.align.clean_match.path" % ( self._project, self._bank )))\n-        self.assertTrue(self._db.doesTableExist("%s_TE_BLRn_path" % (self._project)))\n-        self._db.execute(\'select * from %s_TE_BLRn_path\' % (self._project))\n-        self.assertEquals(NB_EXPECTED_LINES_IN_PATH_FILE, len(self._db.fetchall()))\n-        self._db.dropTable("%s_TE_BLRn_path" % (self._project))\n-        \n-        \n-    def _createPathFiles( self, bankFull ):\n-        bank = os.path.split(bankFull)[1]\n-        fileName = "batch_1.fa_BLRn_" + bank + ".align.clean_match.path"\n-        f = open(fileName, "w")\n-        f.write("1\\tQueryName1\\t2\\t250\\tsubjectName1\\t5\\t255\\t4.1e-39\\t132\\t88.2\\n")\n-        f.write("2\\tQueryName1\\t255\\t550\\tsubjectName2\\t5\\t255\\t0.0002\\t32\\t78.2\\n")\n-        f.write("3\\tQueryName2\\t1\\t150\\tsubjectName1\\t250\\t400\\t5.1e-59\\t132\\t98\\n")\n-        f.write("4\\tQueryName3\\t2\\t250\\tsubjectName3\\t5\\t255\\t4.1e-39\\t132\\t88.2\\n")\n-        f.write("5\\tQueryName1\\t300\\t450\\tsubjectName1\\t300\\t450\\t4.1e-39\\t132\\t80.2\\n")\n-        f.close()\n-        fileName = "batch_2.fa_BLRn_" + bank + ".align.clean_match.path"\n-        f = open(fileName, "w")\n-        f.write("1\\tQueryName4\\t2\\t250\\tsubjectName1\\t5\\t255\\t4.1e-39\\t132\\t88.2\\n")\n-        f.write("2\\tQueryName4\\t255\\t550\\tsubjectName2\\t5\\t255\\t0.0002\\t32\\t78.2\\n")\n-        f.write("3\\tQueryName5\\t1\\t150\\tsubjectName1\\t250\\t400\\t5.1e-59\\t132\\t98\\n")\n-        f.write("4\\tQueryName6\\t2\\t250\\tsubjectName3\\t5\\t255\\t4.1e-39\\t132\\t88.2\\n")\n-        f.write("5\\tQueryName7\\t300\\t450\\tsubjectName1\\t300\\t450\\t4.1e-39\\t132\\t80.2\\n")\n-        f.close()\n-        \n-        \n-    def _readPathResultsFromTableAndFillList( self ):\n-        tablePathAdaptatorInstance = TablePathAdaptator (self._db, "%s_TE_BLRn_path" % (self._project))\n-        pathList = tablePathAdaptatorInstance.getListOfAllPaths()\n-        return pathList\n-    \n-    \n-    def _readPathResultsFromFileAndFillList( self ):\n-        pathInstance = Path()\n-        pathList = []\n-        f = open( "%s_BLRn_%s.align.clean_match.path" % (self._project, self._bank) , "r")\n-        while pathInstance.read( f ):\n-            pathList.append(pathInstance)\n-            pathInstance = Path()\n-        f.close()\n-        return pathList\n-   \n-   \n-    def _createFile( self, nameFile ):\n-        f = open(nameFile, "w")\n-        f.close()\n-        \n-        \n-test_suite = unittest.TestSuite()\n-test_suite.addTest( unittest.makeSuite( Test_RepbaseBLRnForClassifierStep1 ) )\n-if __name__ == "__main__":\n-    unittest.TextTestRunner(verbosity=2).run( test_suite )\n'
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/pyRepetUnit/components/AbstractClusterLauncher.py
--- a/commons/pyRepetUnit/components/AbstractClusterLauncher.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
b'@@ -1,606 +0,0 @@\n-#!/usr/bin/env python\n-\n-# Copyright INRA (Institut National de la Recherche Agronomique)\n-# http://www.inra.fr\n-# http://urgi.versailles.inra.fr\n-#\n-# This software is governed by the CeCILL license under French law and\n-# abiding by the rules of distribution of free software.  You can  use, \n-# modify and/ or redistribute the software under the terms of the CeCILL\n-# license as circulated by CEA, CNRS and INRIA at the following URL\n-# "http://www.cecill.info". \n-#\n-# As a counterpart to the access to the source code and  rights to copy,\n-# modify and redistribute granted by the license, users are provided only\n-# with a limited warranty  and the software\'s author,  the holder of the\n-# economic rights,  and the successive licensors  have only  limited\n-# liability. \n-#\n-# In this respect, the user\'s attention is drawn to the risks associated\n-# with loading,  using,  modifying and/or developing or reproducing the\n-# software by the user in light of its specific status of free software,\n-# that may mean  that it is complicated to manipulate,  and  that  also\n-# therefore means  that it is reserved for developers  and  experienced\n-# professionals having in-depth computer knowledge. Users are therefore\n-# encouraged to load and test the software\'s suitability as regards their\n-# requirements in conditions enabling the security of their systems and/or \n-# data to be ensured and,  more generally, to use and operate it in the \n-# same conditions as regards security. \n-#\n-# The fact that you are presently reading this means that you have had\n-# knowledge of the CeCILL license and that you accept its terms.\n-\n-import getopt\n-import time\n-import glob\n-import sys\n-import os\n-\n-from commons.core.checker.CheckerException import CheckerException\n-from commons.core.sql.RepetJob import RepetJob\n-from commons.core.sql.Job import Job\n-from commons.core.stat.Stat import Stat\n-from pyRepet.launcher.AbstractProgramLauncher import AbstractProgramLauncher\n-\n-GENERIC_IN_FILE = "zDUMMYz"\n-\n-\n-## Abstract class to launch a program in parallel on a cluster.\n-#\n-class AbstractClusterLauncher( object ):  #( IClusterLauncher )\n-     \n-    def __init__( self ):\n-        """\n-        Constructor.\n-        """\n-        self._inputDir = ""            # path to the directory with input files\n-        self._queueName = ""           # name of the queue on the cluster\n-        self._groupId = ""             # identifier of the group of jobs (groupid)\n-        self._inputFileSuffix = "fa"   # suffix of the input files (default=\'fa\')\n-        self._prgAcronym = ""          # acronym of the program to launch\n-        self._configFile = ""          # name of the configuration file (connect to MySQL)\n-        self._currentDir = os.getcwd() # path to the current directory\n-        self._tmpDir = ""              # path to the temporary directory\n-        self._jobTable = "jobs"        # name of the table recording the jobs\n-        self._catOutFiles = False      # concatenate output files of all jobs\n-        self._clean = False            # clean job file, job stdout, job table...\n-        self._verbose = 1              # verbosity level\n-        self.jobdb = None              # RepetJob instance\n-        self.job = Job()               # Job instance\n-        \n-        self._nbJobs = 0\n-        self._cmdLineGenericOptions = "hi:Q:g:S:a:C:d:j:Zcv:"\n-        self._cmdLineSpecificOptions = ""\n-        \n-        self._exeWrapper = "AbstractProgramLauncher.py"\n-        self._prgLauncher = None\n-        # list of instances derived from AbstractProgramLauncher()\n-        # If several program are launched successively in the same job,\n-        # \'lPrgLaunchers\' has to be filled before run().\n-        self.lPrgLaunchers = []\n-    \n-    def setProgramLauncherAttributeFromCmdLine(self, o, a=""):\n-        self.getProgramLauncherInstance().setASpecificAttributeFromCmdLine(o, a)\n-      \n-    def setClusterLauncherAttributeFromCmdLine(self, o, a=""):\n-        i'..b'lf.getTemporaryDirectory() == "":\n-            self.setTemporaryDirectory(self._currentDir)\n-    \n-    def checkGenericAttributes( self ):\n-        self.checkClusterLauncherAttributes()\n-        \n-    def checkProgramLauncherAttributes( self ):\n-        self.getProgramLauncherInstance().checkSpecificAttributes()\n-    \n-    def checkSpecificAttributes( self ):\n-        self.checkProgramLauncherAttributes()\n-        \n-    def start( self ):\n-            \n-        if self.lPrgLaunchers == []:\n-            self.setSingleProgramLauncher()\n-        for pL in self.lPrgLaunchers:\n-            if pL.getWrapperCommandLine() == "":\n-                string = "ERROR: wrapper command is empty !"\n-                print string\n-                sys.exit(1)\n-            if pL.getProgramCommandLine() == "":\n-                string = "ERROR: program command is empty !"\n-                print string\n-                sys.exit(1)\n-        self.checkProgramAvailability()\n-        \n-        try:\n-            self.checkProgramLauncherAttributes()\n-        except CheckerException, msg:\n-            print msg\n-            print self.getHelpAsString()\n-            sys.exit(1)\n-        \n-        if self.getVerbosityLevel() > 0:\n-            string = "START %s" % ( type(self).__name__ )\n-            print string\n-        self.job.tablename = self.getJobTableName()\n-        self.job.groupid = self.getGroupIdentifier()\n-        tokens = self.getQueueName().replace("\'","").split(" ")\n-        self.job.setQueue( tokens[0] )\n-        if len(tokens) > 1:\n-            lResources = tokens[1:]\n-            self.job.lResources = lResources\n-        if self.getVerbosityLevel() > 0:\n-            print "groupid: %s" % ( self.getGroupIdentifier() )\n-        self.jobdb = RepetJob( cfgFileName=self.getConfigFile() )\n-        if self.jobdb.hasUnfinishedJob( self.job.tablename, \\\n-                                          self.job.groupid ):\n-            self.jobdb.waitJobGroup( self.job.tablename, self.job.groupid )\n-            return\n-        self.jobdb.cleanJobGroup( self.job.tablename, self.job.groupid )\n-        sys.stdout.flush()\n-   \n-    def end( self ):\n-        if self.getClean():\n-            self.removeAllJobFiles()\n-            self.removeAllJobStdouts()\n-            self.removeAllJobStderrs()\n-            \n-        if self.getCatOutputFiles():\n-            self.catOutputFiles()\n-        \n-        self.jobdb.close()\n-        \n-        if self.getVerbosityLevel() > 0:\n-            string = "END %s" % ( type(self).__name__ )\n-            print string\n-        sys.stdout.flush()\n-        \n-    def run( self ):\n-        try:\n-            self.checkClusterLauncherAttributes()\n-        except CheckerException, msg:\n-            print msg\n-            print self.getHelpAsString()\n-            sys.exit(1)\n-            \n-        self.start()\n-        \n-        lInFiles = self.getInputFilesList()\n-        self._nbJobs = len(lInFiles)\n-        \n-        if self._verbose > 0:\n-            string = "submitting " + str(self._nbJobs) +  " jobs... " + self.formatGroupidAndTime() \n-            print string; sys.stdout.flush()\n-        \n-        self.submitJob(lInFiles)\n-        \n-        if self._verbose > 0:        \n-            string = "waiting for jobs... " + self.formatGroupidAndTime() \n-            print string; sys.stdout.flush()\n-        \n-        self.jobdb.waitJobGroup( self.job.tablename, self.job.groupid )\n-        \n-        if self._verbose > 0:\n-            string = "all jobs completed ! " + self.formatGroupidAndTime() \n-            print string; sys.stdout.flush()\n-            statsExecutionTime = self.getStatsOfExecutionTime()\n-            print "execution time of all jobs (seconds): %f" % statsExecutionTime.getSum()\n-            print "execution time per job: %s" % statsExecutionTime.string()\n-            sys.stdout.flush()\n-            \n-        self.jobdb.cleanJobGroup( self.job.tablename, self.job.groupid )\n-        \n-        self.end()\n-            \n-    \n'
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/pyRepetUnit/components/AbstractProgramLauncher.py
--- a/commons/pyRepetUnit/components/AbstractProgramLauncher.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,73 +0,0 @@
-#!/usr/bin/env python
-##@file
-# Abstract class to launch a program.
-
-import getopt
-import sys
-import os
-import pyRepet.launcher.AbstractProgramLauncher
-
-class AbstractProgramLauncher( pyRepet.launcher.AbstractProgramLauncher.AbstractProgramLauncher ):  #( IProgramLauncher )
-    
-    def getHelpAsString( self ):
-        """
-        Return the generic help as a string.
-        """
-        string = ""
-        string += "usage: %s.py [options]" % ( type(self).__name__ )
-        string += "\ngeneric options:"
-        string += "\n     -h: this help"
-        string += "\n     -i: name of the input file (format='%s')" % ( self.getFormatInputFile() )
-        string += "\n     -c: clean"
-        string += "\n     -v: verbosity level (default=0/1)"
-        return string
-    
-    def setAttributesFromCmdLine( self, o, a="" ):
-        """
-        Set a generic attribute from the command-line arguments.
-        """
-        if o == "-h":
-            print self.getHelpAsString()
-            sys.exit(0)
-        elif o == "-i":
-            self.setInputFile( a )
-        elif o == "-c":
-            self.setClean()
-        elif o == "-v":
-            self.setVerbosityLevel( a )
-    
-    def checkAttributesFromCmdLine( self ):
-        """
-        Set the attributes from the command-line arguments.
-        """
-        try:
-            opts, args = getopt.getopt( sys.argv[1:], "%s" % (self.getCmdLineOptions()) )
-        except getopt.GetoptError, err:
-            print str(err);
-            print self.getHelpAsString()
-            sys.exit(1)
-        for o, a in opts:
-            self.setAttributesFromCmdLine( o, a )
-    
-    def getCmdLineOptions(self):
-        return self._cmdLineGenericOptions
-            
-    def check( self ):
-        """
-        Check the generic attributes before running the program.
-        """
-        self._checkProgramName()
-        self.checkInput()
-
-    def checkInput(self):
-        if self.getInputFile() == "":
-            string = "ERROR: missing input file"
-            print string
-            print self.getHelpAsString()
-            sys.exit(1)
-        
-        if not os.path.exists(self.getInputFile()):
-            string = "ERROR: input file '%s' doesn't exist" % (self.getInputFile())
-            print string
-            print self.getHelpAsString()
-            sys.exit(1)
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/pyRepetUnit/components/IClusterLauncher.py
--- a/commons/pyRepetUnit/components/IClusterLauncher.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,290 +0,0 @@
-
-## Interface for AbstractClusterLauncher 
-#
-class IClusterLauncher(object):
-    
-    ## Constructor.
-    #
-    def __init__( self ):
-        pass
-    
-    ## Useful commands before running the program (check, open database connector...).
-    #
-    def start(self):
-        pass
-    
-    ## Useful commands after the program was run (clean, close database connector...).
-    #
-    def end(self):
-        pass
-    
-    ## Launch jobs in parallel on each file in the query directory.
-    #
-    def run(self):
-        pass
-    
-    ## Initialize the job (jobname, command, launcher).
-    #
-    def initializeJob(self, fileName, count):
-        pass
-    
-    ## Return all the job commands as a string.
-    #
-    def getJobCommandsAsString(self, fileName, jobName, minFreeGigaInTmpDir=1):
-        pass
-    
-    ## Return the generic help as a string.
-    #
-    def getGenericHelpAsString(self):
-        pass
-    
-    ## Check the generic attributes before running the program.
-    #
-    def checkGenericAttributes(self):
-        pass
-    
-    ## Check the specific attributes of each program launcher.
-    #
-    def checkSpecificAttributes(self):
-        pass
-    
-    ## Check that all required programs are in the user's PATH.
-    #
-    def checkProgramAvailability(self):
-        pass
-    
-    ## Return the command-line to launch in each job. Specified in each wrapper.
-    #
-    def getProgramCommandLineAsString(self):
-        pass
-    
-    ## Return the list of files to keep at the end of each job. Specified in each wrapper.
-    #
-    def getListFilesToKeep(self):
-        pass
-    
-    ## Return the list of files to remove at the end of each job. Specified in each wrapper.
-    #
-    def getListFilesToRemove(self):
-        pass
-    
-    ## Return the name of the job file as a string.
-    #
-    def getJobFileNameAsString(self, count):
-        pass
-    
-    ## Return the command to update the job status in the table.
-    #
-    def getCmdUpdateJobStatusAsString(self, newStatus):
-        pass
-    
-    ## Return the launching command as a string. Launch the wrapper, retrieve its exit status, update status if error.
-    #
-    def getCmdToLaunchWrapper(self, fileName, genericCmd, exeWrapper):
-        pass
-    
-    ## Return the commands to keep the output files.
-    #
-    def getCmdToKeepFiles( self, fileName, lFilesToKeep ):
-        pass
-    
-    ## Return the commands to remove the temporary files.
-    #
-    def getCmdToRemoveFiles( self, fileName, lFilesToRemove ):
-        pass
-    
-    ## Remove all job files.
-    #   
-    def removeAllJobFiles( self ):
-        pass
-            
-    ## Remove all job stdout.
-    # 
-    def removeAllJobStdouts( self ):
-        pass
-            
-    ## Remove all job stderr.
-    #
-    def removeAllJobStderrs( self ):
-        pass
-            
-    ## Process the output file if necessary.
-    #        
-    def processOutputFile( self, tmpFile, outFile ):
-        pass
-        
-    ## Concatenate output files from all jobs.
-    #    
-    def catOutputFiles( self ):
-        pass
-    
-    ## Return the specific help as a string.
-    #
-    def getSpecificHelpAsString( self ):
-        pass
-    
-    ## Return the help as a string.
-    #
-    def getHelpAsString( self ):
-        pass
-    
-    ##Set a generic attribute from the command-line arguments.
-    #
-    def setAGenericAttributeFromCmdLine( self, o, a="" ):
-        pass
-            
-    ## Set the specific attributes from the command-line arguments.
-    #       
-    def setASpecificAttributeFromCmdLine( self, o, a="" ):
-        pass
-        
-    ## Set the attributes from the command-line arguments.
-    #
-    def setAttributesFromCmdLine( self ):
-        pass
-            
-    ## 
-    #        
-    def setInputDirectory( self, arg ):
-        pass
-
-    ## 
-    #
-    def setQueueName( self, arg ):
-        pass
-    
-    ##
-    #    
-    def setGroupIdentifier( self, arg ):
-        pass
-    
-    ##
-    #
-    def setInputFileSuffix( self, arg ):
-        pass
-    
-    ##
-    #   
-    def setAcronym( self, arg ):
-        pass
-    
-    ##
-    #    
-    def setConfigFile( self, arg ):
-        pass
-    
-    ##
-    #        
-    def setCurrentDirectory( self ):
-        pass
-    
-    ##
-    #    
-    def setTemporaryDirectory( self, arg ):
-        pass
-    
-    ##
-    #
-    def setJobTableName( self, arg ):
-        pass
-    
-    ##
-    #
-    def setCatOutputFiles( self ):
-        pass
-    
-    ##
-    #
-    def setClean( self ):
-        pass
-    
-    ##
-    #
-    def setVerbosityLevel( self, arg ):
-        pass
-    
-    ##
-    #
-    def setExecutableWrapper( self, arg ):
-        pass
-    
-    ## Set the wrapper and program command-lines of the program launcher. Append the program launcher to 'self.lPrgLaunchers'.
-    #
-    def setSingleProgramLauncher( self ):
-        pass
-        
-    ##
-    #
-    def getInputDirectory( self ):
-        pass
-    
-    ##
-    #    
-    def getQueueName( self ):
-        pass
-    
-    ##
-    #    
-    def getGroupIdentifier( self ):
-        pass
-    
-    ##
-    #
-    def getInputFileSuffix( self ):
-        pass
-    
-    ##
-    #
-    def getAcronym( self ):
-        pass
-    
-    ##
-    #    
-    def getConfigFile( self ):
-        pass
-    
-    ##
-    #
-    def getCurrentDirectory( self ):
-        pass
-    
-    ##
-    #   
-    def getTemporaryDirectory( self ):
-        pass
-    
-    ##
-    # 
-    def getJobTableName( self ):
-        pass
-    
-    ##
-    #
-    def getCatOutputFiles( self ):
-        pass
-    
-    ##
-    #
-    def getClean( self ):
-        pass
-    
-    ##
-    #
-    def getVerbosityLevel( self ):
-        pass
-    
-    ##
-    #
-    def getWrapperName( self ):
-        pass
-    
-    ##
-    #
-    def getProgramName( self ):
-        pass
-    
-    ##
-    #
-    def getPatternToConcatenate( self ):
-        pass
-    
\ No newline at end of file
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/pyRepetUnit/components/blastx2GFF/tests/blastx2GFFTestSuite.py
--- a/commons/pyRepetUnit/components/blastx2GFF/tests/blastx2GFFTestSuite.py Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,26 +0,0 @@
-import unittest
-import sys
-import Test_BlasterClusterLauncher
-import Test_BlasterProgramLauncher
-import Test_F_BlasterClusterLauncher
-import Test_F_BlasterComponent
-import Test_F_BlasterMatcher2GFF3
-import Test_F_BlasterMatcherComponent
-import Test_F_BlasterProgramLauncher
-
-def main():
-    
-        commonsTestSuite = unittest.TestSuite() 
-        commonsTestSuite.addTest( unittest.makeSuite( Test_BlasterClusterLauncher.Test_BlasterClusterLauncher, "test" ) )
-        commonsTestSuite.addTest( unittest.makeSuite( Test_BlasterProgramLauncher.Test_BlasterProgramLauncher, "test" ) )
-        commonsTestSuite.addTest( unittest.makeSuite( Test_F_BlasterClusterLauncher.Test_F_BlasterClusterLauncher, "test" ) )
-        commonsTestSuite.addTest( unittest.makeSuite( Test_F_BlasterComponent.Test_F_BlasterComponent, "test" ) )
-        commonsTestSuite.addTest( unittest.makeSuite( Test_F_BlasterMatcher2GFF3.Test_F_BlasterMatcher2GFF3, "test" ) )
-        commonsTestSuite.addTest( unittest.makeSuite( Test_F_BlasterMatcherComponent.Test_F_BlasterMatcherComponent, "test" ) )
-        commonsTestSuite.addTest( unittest.makeSuite( Test_F_BlasterProgramLauncher.Test_F_BlasterProgramLauncher, "test" ) )
-        runner = unittest.TextTestRunner( sys.stderr, 2, 2 )
-        runner.run( commonsTestSuite )
-
-      
-if __name__ == "__main__":
-    main()
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/pyRepetUnit/components/blastx2GFF/tests/datas/dummy.align.match.path
--- a/commons/pyRepetUnit/components/blastx2GFF/tests/datas/dummy.align.match.path Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,5 +0,0 @@
-1 lm_SuperContig_30_v2 35498 35914 mito_010 NADH dehydrogenase (ubiquinone) chain 5 307 445 1e-62 244 82.73
-1 lm_SuperContig_30_v2 37314 37823 mito_010 NADH dehydrogenase (ubiquinone) chain 5 494 663 8e-67 258 67.65
-161 lm_SuperContig_29_v2 193781 194212 1nc550_030 related to putative multidrug transporter Mfs1.1 (major facilitator family protein) 228 85 1e-40 84 30.56
-161 lm_SuperContig_29_v2 192832 193704 1nc550_030 related to putative multidrug transporter Mfs1.1 (major facilitator family protein) 522 229 1e-40 106 23.99
-174 lm_SuperContig_29_v2 78031 78588 xnc164_090 related to multidrug resistance protein 19 209 3e-21 101 30.89
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/pyRepetUnit/components/blastx2GFF/tests/datas/dummy.align.match.tab
--- a/commons/pyRepetUnit/components/blastx2GFF/tests/datas/dummy.align.match.tab Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,3 +0,0 @@
-lm_SuperContig_30_v2 35498 37823 927 0.00598594 1.29469 mito_010 307 663 309 0.431564 8e-67 424 74.4336 1
-lm_SuperContig_29_v2 192832 194212 1305 0.00649448 2.13934 1nc550_030 522 85 438 0.718033 1e-40 99 26.1649 161
-lm_SuperContig_29_v2 78031 78588 558 0.00277695 0.980668 xnc164_090 19 209 191 0.335677 3e-21 101 30.89 174
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/pyRepetUnit/components/blastx2GFF/tests/datas/exp_dummy.gff
--- a/commons/pyRepetUnit/components/blastx2GFF/tests/datas/exp_dummy.gff Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,9 +0,0 @@
-##gff-version 3
-lm_SuperContig_30_v2 blastx_ProtBank match 35498 37823 8e-67 + . ID=BlastBank_lm_SuperContig_30_v2_mito_010_m0001;Target=mito_010+307+663;Name=lm_SuperContig_30_v2_mito_010;target_pcover=43.15;target_pident=74.43;evalue=8e-67;target_description=NADH dehydrogenase (ubiquinone) chain 5;target_length=716;lib=BlastBank;program=blastx
-lm_SuperContig_30_v2 blastx_ProtBank match_part 35498 35914 1e-62 + 0 ID=BlastBank_lm_SuperContig_30_v2_mito_010_m0001mp0001;Target=mito_010+307+445;Parent=BlastBank_lm_SuperContig_30_v2_mito_010_m0001
-lm_SuperContig_30_v2 blastx_ProtBank match_part 37314 37823 8e-67 + 2 ID=BlastBank_lm_SuperContig_30_v2_mito_010_m0001mp0002;Target=mito_010+494+663;Parent=BlastBank_lm_SuperContig_30_v2_mito_010_m0001
-lm_SuperContig_29_v2 blastx_ProtBank match 192832 194212 1e-40 - . ID=BlastBank_lm_SuperContig_30_v2_1nc550_030_m0002;Target=1nc550_030+85+522;Name=lm_SuperContig_30_v2_1nc550_030;target_pcover=71.80;target_pident=26.16;evalue=1e-40;target_description=related to putative multidrug transporter Mfs1.1 (major facilitator family protein);target_length=610;lib=BlastBank;program=blastx
-lm_SuperContig_29_v2 blastx_ProtBank match_part 193781 194212 1e-40 - 0 ID=BlastBank_lm_SuperContig_30_v2_1nc550_030_m0002mp0002;Target=1nc550_030+85+228;Parent=BlastBank_lm_SuperContig_30_v2_1nc550_030_m0002
-lm_SuperContig_29_v2 blastx_ProtBank match_part 192832 193704 1e-40 - 2 ID=BlastBank_lm_SuperContig_30_v2_1nc550_030_m0002mp0001;Target=1nc550_030+229+522;Parent=BlastBank_lm_SuperContig_30_v2_1nc550_030_m0002
-lm_SuperContig_29_v2 blastx_ProtBank match 78031 78588 3e-21 + . ID=BlastBank_lm_SuperContig_30_v2_xnc164_090_m0003;Target=xnc164_090+19+209;Name=lm_SuperContig_30_v2_xnc164;target_pcover=33.56;target_pident=30.89;evalue=3e-21;target_description=related to multidrug resistance protein;target_length=569;lib=BlastBank;program=blastx
-lm_SuperContig_29_v2 blastx_ProtBank match_part 78031 78588 3e-21 + 1 ID=BlastBank_lm_SuperContig_30_v2_xnc164_090_m0003mp0001;Target=xnc164_090+19+209;Parent=BlastBank_lm_SuperContig_30_v2_xnc164_090_m0003
\ No newline at end of file
b
diff -r 9bcfa7936eec -r c265f13066d8 commons/pyRepetUnit/components/blastx2GFF/tests/datas/lm_supctg_v2_29_30_vs_BlastBank.align
--- a/commons/pyRepetUnit/components/blastx2GFF/tests/datas/lm_supctg_v2_29_30_vs_BlastBank.align Mon Apr 29 03:23:29 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
b'@@ -1,456 +0,0 @@\n-lm_SuperContig_30_v2\t23817\t24089\tmito_010 NADH dehydrogenase (ubiquinone) chain 5\t1\t91\t7e-25\t119\t63.74\n-lm_SuperContig_30_v2\t27615\t28001\tmito_010 NADH dehydrogenase (ubiquinone) chain 5\t109\t237\t1e-53\t214\t77.52\n-lm_SuperContig_30_v2\t29503\t29673\tmito_010 NADH dehydrogenase (ubiquinone) chain 5\t254\t310\t3e-21\t107\t92.98\n-lm_SuperContig_30_v2\t35498\t35914\tmito_010 NADH dehydrogenase (ubiquinone) chain 5\t307\t445\t1e-62\t244\t82.73\n-lm_SuperContig_30_v2\t37314\t37823\tmito_010 NADH dehydrogenase (ubiquinone) chain 5\t494\t663\t8e-67\t258\t67.65\n-lm_SuperContig_30_v2\t23817\t24089\tmito_020 predicted ND5 intron 2 protein\t1\t91\t7e-25\t119\t63.74\n-lm_SuperContig_30_v2\t27615\t28001\tmito_020 predicted ND5 intron 2 protein\t109\t237\t1e-53\t214\t77.52\n-lm_SuperContig_30_v2\t28681\t29418\tmito_020 predicted ND5 intron 2 protein\t303\t540\t4e-37\t159\t41.2\n-lm_SuperContig_30_v2\t94306\t95085\tmito_020 predicted ND5 intron 2 protein\t544\t279\t2e-22\t110\t28.46\n-lm_SuperContig_30_v2\t18181\t19317\tmito_030 predicted ND5 intron 1 protein\t167\t528\t3e-57\t226\t37.76\n-lm_SuperContig_30_v2\t22437\t23375\tmito_030 predicted ND5 intron 1 protein\t219\t528\t1e-43\t181\t32.59\n-lm_SuperContig_30_v2\t23817\t24089\tmito_030 predicted ND5 intron 1 protein\t1\t91\t7e-25\t119\t63.74\n-lm_SuperContig_30_v2\t26190\t27509\tmito_030 predicted ND5 intron 1 protein\t84\t525\t0\t666\t76.52\n-lm_SuperContig_30_v2\t32527\t33390\tmito_030 predicted ND5 intron 1 protein\t236\t518\t6e-40\t169\t36.15\n-lm_SuperContig_30_v2\t35963\t37213\tmito_030 predicted ND5 intron 1 protein\t114\t525\t4e-62\t242\t38.08\n-lm_SuperContig_30_v2\t55780\t56187\tmito_030 predicted ND5 intron 1 protein\t492\t357\t1e-34\t96\t36.96\n-lm_SuperContig_30_v2\t56292\t56582\tmito_030 predicted ND5 intron 1 protein\t351\t255\t1e-34\t74\t38.78\n-lm_SuperContig_30_v2\t61805\t62656\tmito_030 predicted ND5 intron 1 protein\t528\t241\t3e-55\t219\t38.89\n-lm_SuperContig_30_v2\t63837\t64676\tmito_030 predicted ND5 intron 1 protein\t511\t232\t1e-35\t155\t35.21\n-lm_SuperContig_30_v2\t80861\t81706\tmito_030 predicted ND5 intron 1 protein\t525\t242\t5e-44\t182\t35.66\n-lm_SuperContig_30_v2\t82749\t83615\tmito_030 predicted ND5 intron 1 protein\t525\t236\t3e-47\t193\t35.27\n-lm_SuperContig_30_v2\t86928\t87770\tmito_030 predicted ND5 intron 1 protein\t525\t242\t3e-47\t193\t36.14\n-lm_SuperContig_30_v2\t90399\t91238\tmito_030 predicted ND5 intron 1 protein\t528\t249\t1e-37\t161\t32.52\n-lm_SuperContig_30_v2\t109092\t109925\tmito_030 predicted ND5 intron 1 protein\t525\t243\t2e-49\t200\t38.16\n-lm_SuperContig_30_v2\t115228\t116103\tmito_030 predicted ND5 intron 1 protein\t236\t528\t6e-48\t195\t35.93\n-lm_SuperContig_30_v2\t116645\t117925\tmito_030 predicted ND5 intron 1 protein\t121\t526\t6e-60\t235\t37.12\n-lm_SuperContig_30_v2\t117965\t119308\tmito_030 predicted ND5 intron 1 protein\t87\t525\t1e-63\t248\t35.79\n-lm_SuperContig_30_v2\t141039\t141308\tmito_030 predicted ND5 intron 1 protein\t250\t342\t8e-47\t58\t34.41\n-lm_SuperContig_30_v2\t141292\t141858\tmito_030 predicted ND5 intron 1 protein\t337\t525\t8e-47\t155\t42.11\n-lm_SuperContig_30_v2\t146223\t147503\tmito_030 predicted ND5 intron 1 protein\t114\t528\t2e-64\t250\t37.61\n-lm_SuperContig_30_v2\t149559\t149744\tmito_030 predicted ND5 intron 1 protein\t233\t296\t6e-40\t41\t35.94\n-lm_SuperContig_30_v2\t149749\t150444\tmito_030 predicted ND5 intron 1 protein\t299\t530\t6e-40\t149\t37.02\n-lm_SuperContig_30_v2\t150994\t152199\tmito_030 predicted ND5 intron 1 protein\t121\t525\t4e-58\t229\t36.3\n-lm_SuperContig_30_v2\t21984\t22220\tmito_040 NADH dehydrogenase (ubiquinone) chain 4L\t1\t79\t3e-30\t136\t84.81\n-lm_SuperContig_30_v2\t18466\t19329\tmito_050 predicted ND4L intron protein\t145\t438\t6e-54\t215\t40.53\n-lm_SuperContig_30_v2\t21984\t22229\tmito_050 predicted ND4L intron protein\t1\t82\t8e-31\t138\t82.93\n-lm_SuperContig_30_v2\t22509\t23387\tmito_050 predicted ND4L intron protein\t145\t438\t7e-81\t305\t49\n-lm_SuperContig_30_v2\t26661\t27530\tmito_050 predicted ND4L intron protein\t145\t438\t1e-43\t181\t35.67\n-lm_SuperContig_30_v2\t32542\t33390\tmito_050 predicted ND4L intron protein\t145\t424\t6e-43\t179\t38.91\n-lm_SuperContig_30_v2\t36323\t37234\tmito_050 predicted ND4L intron protein\t145\t438\t4e-49\t199\t40.39\n-lm_SuperContig_30_v2\t'..b'cuolar Basic Amino acid transporter, Contig um_contig_1.17\t529\t218\t2e-42\t82\t20.7\n-lm_SuperContig_29_v2\t193787\t194374\tum00679 related to VBA1 - Vacuolar Basic Amino acid transporter, Contig um_contig_1.17\t211\t18\t2e-42\t114\t31\n-lm_SuperContig_29_v2\t78115\t78588\tum00842 probable aflatoxin efflux pump AFLT, Contig um_contig_1.27\t53\t210\t2e-53\t183\t55.06\n-lm_SuperContig_29_v2\t78662\t78814\tum00842 probable aflatoxin efflux pump AFLT, Contig um_contig_1.27\t211\t264\t2e-53\t47\t44.44\n-lm_SuperContig_29_v2\t192760\t193692\tum00842 probable aflatoxin efflux pump AFLT, Contig um_contig_1.27\t534\t211\t2e-104\t220\t36.92\n-lm_SuperContig_29_v2\t193766\t194239\tum00842 probable aflatoxin efflux pump AFLT, Contig um_contig_1.27\t210\t53\t2e-104\t183\t55.06\n-lm