From 3c0ee2e11434fe2beb713837b8007dc6bcf4c612 Mon Sep 17 00:00:00 2001 From: Hernan Morales Date: Mon, 16 Mar 2026 01:04:02 -0300 Subject: [PATCH 1/3] Add Genomic Ranges support Remove Pharo 13 deprecated FileList and RPackage methods --- .../BioPharoCommon/ArchiveMember.extension.st | 12 +- .../BioPharoCommon/BioObject.extension.st | 62 +- .../BioPharoCommon/DateAndTime.extension.st | 6 +- .../BioPharoCommon/FileList.extension.st | 18 - .../BioPharoCommon/FileSystem.extension.st | 4 +- .../MacOSXPlatform.extension.st | 4 +- .../BioPharoCommon/RPackage.extension.st | 7 - .../SequenceableCollection.extension.st | 4 +- .../SettingTreeBuilder.extension.st | 4 +- .../BioPharoCommon/UnixPlatform.extension.st | 4 +- .../BioPharoCommon/Win32Platform.extension.st | 4 +- repository/BioPharoCommon/package.st | 2 +- .../BioAbstractSequenceTest.class.st | 40 +- .../BioTools-Tests/BioAbstractTest.class.st | 20 +- .../BioTools-Tests/BioAccessionTest.class.st | 20 +- .../BioTools-Tests/BioAdapterTest.class.st | 44 +- .../BioTools-Tests/BioAlignmentTest.class.st | 58 +- .../BioTools-Tests/BioAlphabetTest.class.st | 10 +- .../BioAssociationTest.class.st | 10 +- .../BioTools-Tests/BioCodonTableTest.class.st | 34 +- .../BioTools-Tests/BioCollectionTest.class.st | 18 +- .../BioDNAAlphabetTest.class.st | 10 +- .../BioFastaMultiRecordTest.class.st | 46 +- .../BioTools-Tests/BioGenomeTest.class.st | 16 +- .../BioGenomicRangesTest.class.st | 320 ++++++++++ .../BioIUPACAmbiguousDNATest.class.st | 10 +- .../BioIUPACAmbiguousRNATest.class.st | 10 +- .../BioIUPACDNAExtendedTest.class.st | 10 +- .../BioIUPACProteinExtendedTest.class.st | 10 +- .../BioIUPACProteinTest.class.st | 12 +- .../BioIUPACUnambiguousDNATest.class.st | 10 +- .../BioIUPACUnambiguousRNATest.class.st | 10 +- .../BioTools-Tests/BioMutableSeqTest.class.st | 14 +- .../BioNamedObjectTest.class.st | 26 +- .../BioTools-Tests/BioPositionTest.class.st | 14 +- .../BioTools-Tests/BioSeqRecordTest.class.st | 26 +- .../BioTools-Tests/BioSequenceTest.class.st | 136 ++-- .../BioTools-Tests/BioStringTest.class.st | 36 +- .../BioTools-Tests/BioUnknownSeqTest.class.st | 26 +- .../BioTools-Tests/CharacterTest.extension.st | 6 +- .../BioTools-Tests/StringTest.extension.st | 4 +- repository/BioTools-Tests/package.st | 2 +- repository/BioTools/Association.extension.st | 8 +- repository/BioTools/Bag.extension.st | 4 +- repository/BioTools/Behavior.extension.st | 4 +- .../BioTools/BioAbstractAdapter.class.st | 36 +- repository/BioTools/BioAccession.class.st | 26 +- repository/BioTools/BioAlignment.class.st | 104 +-- repository/BioTools/BioAlphabet.class.st | 64 +- repository/BioTools/BioBasicReader.class.st | 8 +- repository/BioTools/BioChromosome.class.st | 24 +- .../BioTools/BioChromosomeFragment.class.st | 20 +- repository/BioTools/BioCodonTable.class.st | 42 +- repository/BioTools/BioCodonTables.class.st | 46 +- repository/BioTools/BioCommandObject.class.st | 16 +- .../BioComplementaryAlphabet.class.st | 22 +- .../BioTools/BioConnectionSettings.class.st | 56 +- .../BioTools/BioConsensusStrategy.class.st | 8 +- repository/BioTools/BioDBObject.class.st | 46 +- repository/BioTools/BioDFSNode.class.st | 32 +- repository/BioTools/BioDNAAlphabet.class.st | 18 +- .../BioTools/BioDNACodonTables.class.st | 180 +++--- repository/BioTools/BioDNANucleotide.class.st | 14 +- repository/BioTools/BioDownloader.trait.st | 34 +- .../BioDummyConsensusStrategy.class.st | 10 +- .../BioTools/BioDuplicatedObject.class.st | 10 +- .../BioTools/BioEmptyResultObject.class.st | 20 +- .../BioTools/BioEntrezXmlReader.class.st | 8 +- .../BioErrorSpecificationObject.class.st | 8 +- repository/BioTools/BioException.class.st | 40 +- .../BioTools/BioExecutionEngine.class.st | 36 +- repository/BioTools/BioExon.class.st | 22 +- repository/BioTools/BioFAOPanel.class.st | 16 +- repository/BioTools/BioFLSerializer.class.st | 18 +- repository/BioTools/BioFTPDownloader.trait.st | 10 +- .../BioTools/BioFastaMultiRecord.class.st | 92 +-- repository/BioTools/BioFastaRecord.class.st | 74 +-- .../BioTools/BioFileCollection.class.st | 14 +- repository/BioTools/BioFilter.class.st | 54 +- .../BioTools/BioFilteredReader.class.st | 54 +- .../BioTools/BioFilteredResult.class.st | 18 +- repository/BioTools/BioGene.class.st | 38 +- repository/BioTools/BioGenome.class.st | 28 +- repository/BioTools/BioGenomicRange.class.st | 112 ++++ repository/BioTools/BioGenomicRanges.class.st | 603 +++++++++++++++++- repository/BioTools/BioGenotype.class.st | 38 +- .../BioTools/BioGenotypeCollection.class.st | 32 +- .../BioTools/BioGroupedCollection.class.st | 10 +- repository/BioTools/BioHTTPClient.class.st | 14 +- .../BioTools/BioINSDCCollection.class.st | 18 +- repository/BioTools/BioIRanges.class.st | 150 +++++ repository/BioTools/BioISAGPanel.class.st | 48 +- repository/BioTools/BioIUPACAlphabet.class.st | 42 +- .../BioTools/BioIUPACAmbiguousDNA.class.st | 24 +- .../BioTools/BioIUPACAmbiguousRNA.class.st | 18 +- repository/BioTools/BioIUPACDNA.class.st | 14 +- .../BioTools/BioIUPACDNAExtended.class.st | 12 +- repository/BioTools/BioIUPACProtein.class.st | 26 +- .../BioTools/BioIUPACProteinExtended.class.st | 12 +- repository/BioTools/BioIUPACRNA.class.st | 16 +- .../BioTools/BioIUPACUnambiguousDNA.class.st | 14 +- .../BioTools/BioIUPACUnambiguousRNA.class.st | 16 +- repository/BioTools/BioInitialResult.class.st | 22 +- .../BioTools/BioInteractorEngine.class.st | 10 +- repository/BioTools/BioKomServer.class.st | 16 +- repository/BioTools/BioLocus.class.st | 54 +- .../BioTools/BioMaObjectSerializer.class.st | 16 +- .../BioMinisatelliteSequence.class.st | 16 +- repository/BioTools/BioMutableSeq.class.st | 16 +- repository/BioTools/BioNCBIUrl2.class.st | 22 +- repository/BioTools/BioNamedObject.class.st | 46 +- .../BioTools/BioNotFoundObject.class.st | 10 +- repository/BioTools/BioNullAlphabet.class.st | 14 +- .../BioTools/BioOSInterfaceEngine.class.st | 26 +- .../BioTools/BioOSPlatformEngine.class.st | 20 +- .../BioTools/BioOSProcessEngine.class.st | 18 +- .../BioTools/BioOSProcessExecutor.class.st | 20 +- .../BioTools/BioOSSubProcessExecutor.class.st | 24 +- repository/BioTools/BioObject.class.st | 122 ++-- .../BioTools/BioOrderedCollection.class.st | 12 +- repository/BioTools/BioPanel.class.st | 24 +- .../BioProcessWrapperExecutor.class.st | 22 +- .../BioTools/BioPropertyObject.class.st | 28 +- .../BioTools/BioRNACodonTables.class.st | 180 +++--- repository/BioTools/BioReader.class.st | 60 +- .../BioTools/BioReadersCollection.class.st | 26 +- .../BioTools/BioRemoteCommandObject.class.st | 16 +- .../BioTools/BioRepeatSequence.class.st | 74 +-- repository/BioTools/BioRestriction.class.st | 18 +- repository/BioTools/BioResultObject.class.st | 76 +-- .../BioTools/BioSIXXSerializer.class.st | 16 +- repository/BioTools/BioSTRSequence.class.st | 34 +- .../BioTools/BioSatelliteSequence.class.st | 14 +- repository/BioTools/BioSeqAnnotation.class.st | 12 +- repository/BioTools/BioSeqQuality.class.st | 18 +- repository/BioTools/BioSeqRecord.class.st | 92 +-- repository/BioTools/BioSequence.class.st | 306 ++++----- .../BioTools/BioSequenceFeature.class.st | 64 +- .../BioTools/BioSerializationEngine.class.st | 26 +- .../BioSmartRefStreamSerializer.class.st | 14 +- repository/BioTools/BioStrand.class.st | 88 +++ repository/BioTools/BioTranscript.class.st | 12 +- .../BioTools/BioUIManagerEngine.class.st | 14 +- repository/BioTools/BioUnknownSeq.class.st | 30 +- repository/BioTools/BioUrl.class.st | 32 +- .../BioTools/BioVersionedObject.class.st | 24 +- repository/BioTools/BioWebClient.class.st | 20 +- .../BioTools/BioWebClientEngine.class.st | 34 +- repository/BioTools/BioWebCollection.class.st | 10 +- repository/BioTools/BioWebResult.class.st | 10 +- .../BioTools/BioWebServerEngine.class.st | 26 +- repository/BioTools/BioZnHTTPServer.class.st | 16 +- repository/BioTools/BioZnHttpClient.class.st | 28 +- repository/BioTools/Character.extension.st | 20 +- repository/BioTools/CharacterSet.extension.st | 4 +- repository/BioTools/Collection.extension.st | 26 +- repository/BioTools/Dictionary.extension.st | 6 +- .../BioTools/FileReference.extension.st | 6 +- .../FileSystemDirectoryEntry.extension.st | 4 +- repository/BioTools/Integer.extension.st | 8 +- repository/BioTools/Interval.extension.st | 6 +- repository/BioTools/Magnitude.extension.st | 4 +- repository/BioTools/Object.extension.st | 100 +-- .../BioTools/OrderedCollection.extension.st | 6 +- .../SequenceableCollection.extension.st | 10 +- repository/BioTools/String.extension.st | 50 +- repository/BioTools/WriteStream.extension.st | 4 +- .../BioTools/ZnEncodedStream.extension.st | 4 +- repository/BioTools/package.st | 2 +- 169 files changed, 3706 insertions(+), 2242 deletions(-) delete mode 100644 repository/BioPharoCommon/FileList.extension.st delete mode 100644 repository/BioPharoCommon/RPackage.extension.st create mode 100644 repository/BioTools-Tests/BioGenomicRangesTest.class.st create mode 100644 repository/BioTools/BioGenomicRange.class.st create mode 100644 repository/BioTools/BioIRanges.class.st create mode 100644 repository/BioTools/BioStrand.class.st diff --git a/repository/BioPharoCommon/ArchiveMember.extension.st b/repository/BioPharoCommon/ArchiveMember.extension.st index a205e983..276f40c7 100644 --- a/repository/BioPharoCommon/ArchiveMember.extension.st +++ b/repository/BioPharoCommon/ArchiveMember.extension.st @@ -1,31 +1,31 @@ -Extension { #name : #ArchiveMember } +Extension { #name : 'ArchiveMember' } -{ #category : #'*BioPharoCommon' } +{ #category : '*BioPharoCommon' } ArchiveMember class >> fileExistsBehavior [ ^ BioSettings fileExistsBehavior ] -{ #category : #'*BioPharoCommon' } +{ #category : '*BioPharoCommon' } ArchiveMember class >> fileExistsBehavior: anObject [ BioSettings fileExistsBehavior: anObject ] -{ #category : #'*BioPharoCommon' } +{ #category : '*BioPharoCommon' } ArchiveMember class >> setAbortOnFileExists [ ^ self fileExistsBehavior: #abort ] -{ #category : #'*BioPharoCommon' } +{ #category : '*BioPharoCommon' } ArchiveMember class >> setDontOverwriteOnFileExists [ ^ self fileExistsBehavior: #okay ] -{ #category : #'*BioPharoCommon' } +{ #category : '*BioPharoCommon' } ArchiveMember class >> setOverwriteOnFileExists [ ^ self fileExistsBehavior: #retryWithOverwrite diff --git a/repository/BioPharoCommon/BioObject.extension.st b/repository/BioPharoCommon/BioObject.extension.st index 024da771..c4b61055 100644 --- a/repository/BioPharoCommon/BioObject.extension.st +++ b/repository/BioPharoCommon/BioObject.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #BioObject } +Extension { #name : 'BioObject' } -{ #category : #'*BioPharoCommon' } +{ #category : '*BioPharoCommon' } BioObject >> connectionRetry [ " Private - Ask for retrying attempt " @@ -9,28 +9,28 @@ BioObject >> connectionRetry [ title: 'Would you like to try again?' translated ] -{ #category : #'*BioPharoCommon' } -BioObject >> fileDirectoryClass [ - " See comment in class method " - - ^ self class fileDirectoryClass -] - -{ #category : #'*BioPharoCommon' } +{ #category : '*BioPharoCommon' } BioObject class >> fileDirectoryClass [ " Answer a helper class to manage file related operations " ^ FileSystem ] -{ #category : #'*BioPharoCommon' } +{ #category : '*BioPharoCommon' } +BioObject >> fileDirectoryClass [ + " See comment in class method " + + ^ self class fileDirectoryClass +] + +{ #category : '*BioPharoCommon' } BioObject class >> fileExists: fileName [ " Answer if fileName exists in receiver's workingDirectory " ^ fileName asFileReference exists ] -{ #category : #'*BioPharoCommon' } +{ #category : '*BioPharoCommon' } BioObject class >> filesIn: pathString [ " Answer a of file references contained in pathString " @@ -39,14 +39,14 @@ BioObject class >> filesIn: pathString [ ] -{ #category : #'*BioPharoCommon' } +{ #category : '*BioPharoCommon' } BioObject class >> newFullFileNamed: fileName [ " Answer a FileStream for a new fileName in the receiver's configured folder " ^ fileName asFileReference writeStream ] -{ #category : #'*BioPharoCommon' } +{ #category : '*BioPharoCommon' } BioObject class >> openFileNamed: fileName [ " Answer a for fileName in the image directory. Assume the file exists " @@ -55,7 +55,7 @@ BioObject class >> openFileNamed: fileName [ ifNil: [ self signalInvalidObject: 'Please specify a file' ] ] -{ #category : #'*BioPharoCommon' } +{ #category : '*BioPharoCommon' } BioObject class >> openFullFileNamed: fileName [ " Answer a FileStream for fileName in the image directory. Assume the file exists " @@ -64,7 +64,7 @@ BioObject class >> openFullFileNamed: fileName [ ifNil: [ self signalInvalidObject: 'Please specify a file' ] ] -{ #category : #'*BioPharoCommon' } +{ #category : '*BioPharoCommon' } BioObject class >> removeFileNamed: fileName [ " Remove fileName in the receiver's current folder " @@ -75,7 +75,7 @@ BioObject class >> removeFileNamed: fileName [ nextPutAll: fileName ]) asFileReference delete. ] -{ #category : #'*BioPharoCommon' } +{ #category : '*BioPharoCommon' } BioObject >> requestDirectoryPath [ " Answer a with selected directory " @@ -83,42 +83,42 @@ BioObject >> requestDirectoryPath [ ] -{ #category : #'*BioPharoCommon' } +{ #category : '*BioPharoCommon' } BioObject >> requestOpenCSVFile [ " See comment in class side " ^ self class requestOpenCSVFile ] -{ #category : #'*BioPharoCommon' } -BioObject >> requestOpenCSVFile: aBlock [ - " See comment in class side " - - ^ self class requestOpenCSVFile: aBlock -] - -{ #category : #'*BioPharoCommon' } +{ #category : '*BioPharoCommon' } BioObject class >> requestOpenCSVFile: actionBlock [ " Open request dialog to select a CSV file and perform actionBlock if selected path is valid " ^ self requestOpenCSVFile ifNotNil: actionBlock ] -{ #category : #'*BioPharoCommon' } -BioObject >> slash [ +{ #category : '*BioPharoCommon' } +BioObject >> requestOpenCSVFile: aBlock [ " See comment in class side " - ^ self class slash + ^ self class requestOpenCSVFile: aBlock ] -{ #category : #'*BioPharoCommon' } +{ #category : '*BioPharoCommon' } BioObject class >> slash [ "Return a with the path delimiter used by this filesystem." ^ FileSystem disk delimiter asString ] -{ #category : #'*BioPharoCommon' } +{ #category : '*BioPharoCommon' } +BioObject >> slash [ + " See comment in class side " + + ^ self class slash +] + +{ #category : '*BioPharoCommon' } BioObject class >> workingDirectory [ " Answer a with the default directory " diff --git a/repository/BioPharoCommon/DateAndTime.extension.st b/repository/BioPharoCommon/DateAndTime.extension.st index ddcf3a26..4475daaa 100644 --- a/repository/BioPharoCommon/DateAndTime.extension.st +++ b/repository/BioPharoCommon/DateAndTime.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #DateAndTime } +Extension { #name : 'DateAndTime' } -{ #category : #'*BioPharoCommon' } +{ #category : '*BioPharoCommon' } DateAndTime >> printYMDHMS [ " Answer the receiver's date in user-friendly format " @@ -10,7 +10,7 @@ DateAndTime >> printYMDHMS [ self printHMSOn: s ] ] -{ #category : #'*BioPharoCommon' } +{ #category : '*BioPharoCommon' } DateAndTime >> printYMDHMSeparatedBy: aCharacter [ " Answer the receiver's date in user-friendly format " diff --git a/repository/BioPharoCommon/FileList.extension.st b/repository/BioPharoCommon/FileList.extension.st deleted file mode 100644 index 1123c676..00000000 --- a/repository/BioPharoCommon/FileList.extension.st +++ /dev/null @@ -1,18 +0,0 @@ -Extension { #name : #FileList } - -{ #category : #'*BioPharoCommon' } -FileList >> bioMaterialize [ - " Private - Materialize and open an explorer over the receiver's selected file " - - (BioSerializationEngine materialize: self fullName) explore -] - -{ #category : #'*BioPharoCommon' } -FileList >> serviceBioMaterialize [ - - ^ (SimpleServiceEntry - provider: self - label: 'BioSmalltalk: Materialize' - selector: #bioMaterialize - description: 'Materialize and Explore this file' ) -] diff --git a/repository/BioPharoCommon/FileSystem.extension.st b/repository/BioPharoCommon/FileSystem.extension.st index fb348641..d653d6db 100644 --- a/repository/BioPharoCommon/FileSystem.extension.st +++ b/repository/BioPharoCommon/FileSystem.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #FileSystem } +Extension { #name : 'FileSystem' } -{ #category : #'*BioPharoCommon' } +{ #category : '*BioPharoCommon' } FileSystem >> fullNameFor: fileName [ "Return a corrected, fully-qualified name for the given file name. If the given name is already a full path (i.e., it contains a delimiter character), assume it is already a fully-qualified name. Otherwise, prefix it with the path to this directory. In either case, correct the local part of the file name." "Details: Note that path relative to a directory, such as '../../foo' are disallowed by this algorithm. Also note that this method is tolerent of a nil argument -- is simply returns nil in this case." diff --git a/repository/BioPharoCommon/MacOSXPlatform.extension.st b/repository/BioPharoCommon/MacOSXPlatform.extension.st index 9cd60e0a..9e20734b 100644 --- a/repository/BioPharoCommon/MacOSXPlatform.extension.st +++ b/repository/BioPharoCommon/MacOSXPlatform.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #MacOSXPlatform } +Extension { #name : 'MacOSXPlatform' } -{ #category : #'*BioPharoCommon' } +{ #category : '*BioPharoCommon' } MacOSXPlatform >> execNameFor: aString [ " Private - See superimplementor's comment " diff --git a/repository/BioPharoCommon/RPackage.extension.st b/repository/BioPharoCommon/RPackage.extension.st deleted file mode 100644 index c1658701..00000000 --- a/repository/BioPharoCommon/RPackage.extension.st +++ /dev/null @@ -1,7 +0,0 @@ -Extension { #name : #RPackage } - -{ #category : #'*BioPharoCommon' } -RPackage >> isPackageTag [ - - ^ true -] diff --git a/repository/BioPharoCommon/SequenceableCollection.extension.st b/repository/BioPharoCommon/SequenceableCollection.extension.st index 7e11fd8a..15a972b1 100644 --- a/repository/BioPharoCommon/SequenceableCollection.extension.st +++ b/repository/BioPharoCommon/SequenceableCollection.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #SequenceableCollection } +Extension { #name : 'SequenceableCollection' } -{ #category : #'*BioPharoCommon' } +{ #category : '*BioPharoCommon' } SequenceableCollection >> asFileCollection [ " Answer a of file streams for the receiver elements, each one representing a path " diff --git a/repository/BioPharoCommon/SettingTreeBuilder.extension.st b/repository/BioPharoCommon/SettingTreeBuilder.extension.st index cb2c1805..4ca76954 100644 --- a/repository/BioPharoCommon/SettingTreeBuilder.extension.st +++ b/repository/BioPharoCommon/SettingTreeBuilder.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #SettingTreeBuilder } +Extension { #name : 'SettingTreeBuilder' } -{ #category : #'*BioPharoCommon' } +{ #category : '*BioPharoCommon' } SettingTreeBuilder >> bioPharoSettings [ ^ self systemsettings diff --git a/repository/BioPharoCommon/UnixPlatform.extension.st b/repository/BioPharoCommon/UnixPlatform.extension.st index ad58b94e..a598d6a0 100644 --- a/repository/BioPharoCommon/UnixPlatform.extension.st +++ b/repository/BioPharoCommon/UnixPlatform.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #UnixPlatform } +Extension { #name : 'UnixPlatform' } -{ #category : #'*BioPharoCommon' } +{ #category : '*BioPharoCommon' } UnixPlatform >> execNameFor: aString [ " Private - See superimplementor's comment " diff --git a/repository/BioPharoCommon/Win32Platform.extension.st b/repository/BioPharoCommon/Win32Platform.extension.st index 2909fd00..5b633dcd 100644 --- a/repository/BioPharoCommon/Win32Platform.extension.st +++ b/repository/BioPharoCommon/Win32Platform.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #Win32Platform } +Extension { #name : 'Win32Platform' } -{ #category : #'*BioPharoCommon' } +{ #category : '*BioPharoCommon' } Win32Platform >> execNameFor: aString [ " Private - See superimplementor's comment " diff --git a/repository/BioPharoCommon/package.st b/repository/BioPharoCommon/package.st index 77a0dfc9..e6ab5c29 100644 --- a/repository/BioPharoCommon/package.st +++ b/repository/BioPharoCommon/package.st @@ -1 +1 @@ -Package { #name : #BioPharoCommon } +Package { #name : 'BioPharoCommon' } diff --git a/repository/BioTools-Tests/BioAbstractSequenceTest.class.st b/repository/BioTools-Tests/BioAbstractSequenceTest.class.st index f3e9ae7e..1a666e5e 100644 --- a/repository/BioTools-Tests/BioAbstractSequenceTest.class.st +++ b/repository/BioTools-Tests/BioAbstractSequenceTest.class.st @@ -1,47 +1,49 @@ Class { - #name : #BioAbstractSequenceTest, - #superclass : #BioAbstractTest, + #name : 'BioAbstractSequenceTest', + #superclass : 'BioAbstractTest', #instVars : [ 'sequence' ], - #category : #'BioTools-Tests-Biological' + #category : 'BioTools-Tests-Biological', + #package : 'BioTools-Tests', + #tag : 'Biological' } -{ #category : #accessing } +{ #category : 'accessing' } BioAbstractSequenceTest >> alphabetClass [ ^ self subclassResponsibility ] -{ #category : #accessing } +{ #category : 'accessing' } BioAbstractSequenceTest >> sampleDnaString01 [ " Unambigous DNA String " ^ 'cagtcatgctag' asUppercase ] -{ #category : #accessing } +{ #category : 'accessing' } BioAbstractSequenceTest >> sampleDnaString02 [ " Unambigous DNA String " ^ 'attcggaggat' asUppercase ] -{ #category : #accessing } +{ #category : 'accessing' } BioAbstractSequenceTest >> sampleDnaString03 [ " Ambigous DNA String " ^ 'atgStgQccR' asUppercase ] -{ #category : #accessing } +{ #category : 'accessing' } BioAbstractSequenceTest >> sampleDnaString04 [ " Ambigous DNA String " ^ 'TCGATCGANTGGGTC' asUppercase ] -{ #category : #accessing } +{ #category : 'accessing' } BioAbstractSequenceTest >> sampleProtString01 [ ^ 'FAALNFMNCSKCWKMYEDDCFLKCLEKHPYPPRWTRQWQINQQWQGNEIMSPDERVHDNW @@ -49,7 +51,7 @@ PICYYKPEMHSRPLMGIYYNAMWPGKEIEWEHVIMYSPAP ' ] -{ #category : #accessing } +{ #category : 'accessing' } BioAbstractSequenceTest >> sampleProtString02 [ " Ambiguous Protein String (includes X ambiguity code)" @@ -58,49 +60,49 @@ PICYYKPEMHSRPLMGIYYNAMWXPGKEIEWEHVIMYSPAP ' ] -{ #category : #accessing } +{ #category : 'accessing' } BioAbstractSequenceTest >> sampleRnaString01 [ " Ambigous RNA String " ^ 'cagucayugcuuag' asUppercase ] -{ #category : #accessing } +{ #category : 'accessing' } BioAbstractSequenceTest >> sampleRnaString02 [ " Unambigous RNA String " ^ 'augcggaggau' asUppercase ] -{ #category : #accessing } +{ #category : 'accessing' } BioAbstractSequenceTest >> sampleSeq01Complementary [ ^ 'gtcagtacgatc' asUppercase ] -{ #category : #accessing } +{ #category : 'accessing' } BioAbstractSequenceTest >> sampleSeq01ReverseComplementary [ ^ 'ctagcatgactg' asUppercase ] -{ #category : #accessing } +{ #category : 'accessing' } BioAbstractSequenceTest >> sampleSeq01Transcription [ ^ 'cagucaugcuag' asUppercase ] -{ #category : #accessing } +{ #category : 'accessing' } BioAbstractSequenceTest >> sequence [ ^ sequence ] -{ #category : #accessing } +{ #category : 'accessing' } BioAbstractSequenceTest >> sequence: anObject [ sequence := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioAbstractSequenceTest >> sequence: aString alphabet: anAlphabetClass [ sequence := @@ -109,7 +111,7 @@ BioAbstractSequenceTest >> sequence: aString alphabet: anAlphabetClass [ alphabet: anAlphabetClass. ] -{ #category : #accessing } +{ #category : 'accessing' } BioAbstractSequenceTest >> setUp [ super setUp. diff --git a/repository/BioTools-Tests/BioAbstractTest.class.st b/repository/BioTools-Tests/BioAbstractTest.class.st index aa79947b..193cd36a 100644 --- a/repository/BioTools-Tests/BioAbstractTest.class.st +++ b/repository/BioTools-Tests/BioAbstractTest.class.st @@ -1,45 +1,47 @@ Class { - #name : #BioAbstractTest, - #superclass : #TestCase, - #category : #'BioTools-Tests-Core' + #name : 'BioAbstractTest', + #superclass : 'TestCase', + #category : 'BioTools-Tests-Core', + #package : 'BioTools-Tests', + #tag : 'Core' } -{ #category : #accessing } +{ #category : 'accessing' } BioAbstractTest >> classFor: aLiteralOrClass [ " Refer to BioObject class comment " ^ BioObject classFor: aLiteralOrClass ] -{ #category : #accessing } +{ #category : 'accessing' } BioAbstractTest >> decode: aString [ " Answer a String. Decodes the fields embedded in aString url ?var1=val1&var2=val2 " ^ BioWebClientEngine decode: aString ] -{ #category : #accessing } +{ #category : 'accessing' } BioAbstractTest >> initMatrixRows: rowsNumber columns: columnsNumber [ " Private - Initialize the receiver's matrix with rowsNumber and columnsNumber " self matrix: (self matrixClass rows: rowsNumber columns: columnsNumber) ] -{ #category : #running } +{ #category : 'running' } BioAbstractTest >> setUp [ super setUp. BioException raiseWarning: false. ] -{ #category : #running } +{ #category : 'running' } BioAbstractTest >> tearDown [ BioException raiseWarning: nil. super tearDown. ] -{ #category : #accessing } +{ #category : 'accessing' } BioAbstractTest >> testFilesFullDirectoryName [ " Private - See comment in BioObject " diff --git a/repository/BioTools-Tests/BioAccessionTest.class.st b/repository/BioTools-Tests/BioAccessionTest.class.st index 25025089..ec09e162 100644 --- a/repository/BioTools-Tests/BioAccessionTest.class.st +++ b/repository/BioTools-Tests/BioAccessionTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #BioAccessionTest, - #superclass : #BioAbstractTest, - #category : #'BioTools-Tests-Core' + #name : 'BioAccessionTest', + #superclass : 'BioAbstractTest', + #category : 'BioTools-Tests-Core', + #package : 'BioTools-Tests', + #tag : 'Core' } -{ #category : #testing } +{ #category : 'testing' } BioAccessionTest >> testAsString [ self assert: @@ -21,7 +23,7 @@ BioAccessionTest >> testAsString [ equals: String empty ] -{ #category : #testing } +{ #category : 'testing' } BioAccessionTest >> testHasVersion [ | accession | @@ -45,7 +47,7 @@ BioAccessionTest >> testHasVersion [ ] -{ #category : #testing } +{ #category : 'testing' } BioAccessionTest >> testIsEmpty [ self deny: 'AF288373.2' asAccession isEmpty. @@ -62,7 +64,7 @@ BioAccessionTest >> testIsEmpty [ self should: [ String empty asAccession ] raise: Error. ] -{ #category : #testing } +{ #category : 'testing' } BioAccessionTest >> testIsVersioned [ | accession | @@ -80,7 +82,7 @@ BioAccessionTest >> testIsVersioned [ ] -{ #category : #testing } +{ #category : 'testing' } BioAccessionTest >> testName [ | accession | accession := BioAccession new @@ -92,7 +94,7 @@ BioAccessionTest >> testName [ self assert: accession asString equals: accession nullName ] -{ #category : #testing } +{ #category : 'testing' } BioAccessionTest >> testVersion [ | accession | accession := BioAccession new diff --git a/repository/BioTools-Tests/BioAdapterTest.class.st b/repository/BioTools-Tests/BioAdapterTest.class.st index 7c1f6811..9e2c0818 100644 --- a/repository/BioTools-Tests/BioAdapterTest.class.st +++ b/repository/BioTools-Tests/BioAdapterTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #BioAdapterTest, - #superclass : #BioAbstractTest, + #name : 'BioAdapterTest', + #superclass : 'BioAbstractTest', #instVars : [ 'adapter' ], - #category : #'BioTools-Tests-Core' + #category : 'BioTools-Tests-Core', + #package : 'BioTools-Tests', + #tag : 'Core' } -{ #category : #accessing } +{ #category : 'accessing' } BioAdapterTest >> adapterEngines [ " Answer a of Engine classes " @@ -19,7 +21,7 @@ BioAdapterTest >> adapterEngines [ } ] -{ #category : #accessing } +{ #category : 'accessing' } BioAdapterTest >> checkTestWebServer [ ^ (BioWebServerEngine hasAnyProvider and: [ self confirm: 'Do you want to start a local web server for testing the web adapters?' ]) @@ -34,33 +36,33 @@ BioAdapterTest >> checkTestWebServer [ self nullUrlAddress ] ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioAdapterTest >> defaultUrlTestAddress [ ^ 'http://www.loremipsum.com/' ] -{ #category : #accessing } +{ #category : 'accessing' } BioAdapterTest >> isRunningTestWebServer [ " Answer if system is running a web server " ^ BioWebServerEngine isRunningTestWebServer ] -{ #category : #accessing } +{ #category : 'accessing' } BioAdapterTest >> nullUrlAddress [ ^ String empty ] -{ #category : #accessing } +{ #category : 'accessing' } BioAdapterTest >> startTestWebServer [ " Private - Start the testing web server " BioWebServerEngine startWebServer ] -{ #category : #accessing } +{ #category : 'accessing' } BioAdapterTest >> stopTestWebServer [ " Private - Stop the testing web server " @@ -68,14 +70,14 @@ BioAdapterTest >> stopTestWebServer [ ifTrue: [ BioWebServerEngine stopWebServer ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioAdapterTest >> tearDown [ super tearDown. self stopTestWebServer ] -{ #category : #testing } +{ #category : 'testing' } BioAdapterTest >> testAdapter [ self adapterEngines do: [: sCls | @@ -85,7 +87,7 @@ BioAdapterTest >> testAdapter [ ] -{ #category : #testing } +{ #category : 'testing' } BioAdapterTest >> testAdapterClass [ self adapterEngines do: [: sCls | @@ -95,7 +97,7 @@ BioAdapterTest >> testAdapterClass [ ] -{ #category : #testing } +{ #category : 'testing' } BioAdapterTest >> testFormatOSInterfaceAdapter [ | answer | @@ -108,7 +110,7 @@ BioAdapterTest >> testFormatOSInterfaceAdapter [ ] -{ #category : #testing } +{ #category : 'testing' } BioAdapterTest >> testProviderClass [ | concreteAdapters | @@ -131,7 +133,7 @@ BioAdapterTest >> testProviderClass [ ]. ] -{ #category : #testing } +{ #category : 'testing' } BioAdapterTest >> testSettingSerializationAdapter [ self assert: ( BioSerializationEngine hasAnyProvider isKindOf: Boolean ). @@ -149,7 +151,7 @@ BioAdapterTest >> testSettingSerializationAdapter [ ] -{ #category : #testing } +{ #category : 'testing' } BioAdapterTest >> testSettingWebClientAdapter [ " | testAddress | @@ -169,7 +171,7 @@ BioAdapterTest >> testSettingWebClientAdapter [ ] -{ #category : #testing } +{ #category : 'testing' } BioAdapterTest >> testUsingOSInterfaceAdapter [ self assert: ( BioOSInterfaceEngine hasAnyProvider isKindOf: Boolean ). @@ -188,7 +190,7 @@ BioAdapterTest >> testUsingOSInterfaceAdapter [ ] -{ #category : #testing } +{ #category : 'testing' } BioAdapterTest >> testUsingWebClientAdapter [ " | testAddress | @@ -205,7 +207,7 @@ BioAdapterTest >> testUsingWebClientAdapter [ ] -{ #category : #testing } +{ #category : 'testing' } BioAdapterTest >> testWebDecodeUrl [ | decoded encodedAddress decodedAddress | @@ -234,7 +236,7 @@ BioAdapterTest >> testWebDecodeUrl [ self assert: decoded = decodedAddress. ] -{ #category : #accessing } +{ #category : 'accessing' } BioAdapterTest >> urlTestAddress [ " Answer a String representing an URL for testing purposes " diff --git a/repository/BioTools-Tests/BioAlignmentTest.class.st b/repository/BioTools-Tests/BioAlignmentTest.class.st index 6d9e13bf..e40b4358 100644 --- a/repository/BioTools-Tests/BioAlignmentTest.class.st +++ b/repository/BioTools-Tests/BioAlignmentTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #BioAlignmentTest, - #superclass : #BioAbstractTest, + #name : 'BioAlignmentTest', + #superclass : 'BioAbstractTest', #instVars : [ 'align' ], - #category : #'BioTools-Tests-Core' + #category : 'BioTools-Tests-Core', + #package : 'BioTools-Tests', + #tag : 'Core' } -{ #category : #accessing } +{ #category : 'accessing' } BioAlignmentTest >> alphaSequence [ ^ BioSequence @@ -16,7 +18,7 @@ BioAlignmentTest >> alphaSequence [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlignmentTest >> betaSequence [ ^ BioSequence @@ -25,7 +27,7 @@ BioAlignmentTest >> betaSequence [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlignmentTest >> gammaSequence [ ^ BioSequence @@ -35,7 +37,7 @@ BioAlignmentTest >> gammaSequence [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlignmentTest >> sampleAlignment01 [ align := BioAlignment new. @@ -47,7 +49,7 @@ BioAlignmentTest >> sampleAlignment01 [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlignmentTest >> sampleAlignment02 [ align := BioAlignment new. @@ -61,7 +63,7 @@ BioAlignmentTest >> sampleAlignment02 [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlignmentTest >> sampleAlignment03 [ align := BioAlignment new. @@ -75,7 +77,7 @@ BioAlignmentTest >> sampleAlignment03 [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlignmentTest >> sampleAlignment04 [ align := BioAlignment new. @@ -89,7 +91,7 @@ BioAlignmentTest >> sampleAlignment04 [ ] -{ #category : #test } +{ #category : 'test' } BioAlignmentTest >> testAnyOne [ align := self sampleAlignment01. @@ -97,7 +99,7 @@ BioAlignmentTest >> testAnyOne [ ] -{ #category : #test } +{ #category : 'test' } BioAlignmentTest >> testAt [ | alignRegion | @@ -114,7 +116,7 @@ BioAlignmentTest >> testAt [ self should: [ align at: 4 ] raise: BioException ] -{ #category : #test } +{ #category : 'test' } BioAlignmentTest >> testAtAccession [ | acc seqWithAccession | @@ -127,7 +129,7 @@ BioAlignmentTest >> testAtAccession [ self assert: (align atAccession: acc) equals: align first. ] -{ #category : #test } +{ #category : 'test' } BioAlignmentTest >> testAtAlignment [ align := self sampleAlignment01. @@ -137,7 +139,7 @@ BioAlignmentTest >> testAtAlignment [ self should: [ align atAlignment: 4 ] raise: BioException ] -{ #category : #testing } +{ #category : 'testing' } BioAlignmentTest >> testAtColumn [ align := self sampleAlignment01. self assert: ((align atColumn: 2) isKindOf: BioSequence). @@ -148,7 +150,7 @@ BioAlignmentTest >> testAtColumn [ self should: [ align atColumn: 0 ] raise: BioErrorSpecificationObject ] -{ #category : #test } +{ #category : 'test' } BioAlignmentTest >> testBeReference [ align := self sampleAlignment01. @@ -157,7 +159,7 @@ BioAlignmentTest >> testBeReference [ self assert: align isReference. ] -{ #category : #testing } +{ #category : 'testing' } BioAlignmentTest >> testConsensus [ align := self sampleAlignment01. @@ -167,7 +169,7 @@ BioAlignmentTest >> testConsensus [ ] -{ #category : #testing } +{ #category : 'testing' } BioAlignmentTest >> testCopyFrom [ | set | align := self sampleAlignment01. @@ -186,7 +188,7 @@ BioAlignmentTest >> testCopyFrom [ self should: [ align copyFrom: -1 to: 1 ] raise: Error ] -{ #category : #test } +{ #category : 'test' } BioAlignmentTest >> testFirst [ align := self sampleAlignment01. @@ -194,7 +196,7 @@ BioAlignmentTest >> testFirst [ self assert: align first equals: self alphaSequence ] -{ #category : #test } +{ #category : 'test' } BioAlignmentTest >> testIsReference [ align := self sampleAlignment01. @@ -203,7 +205,7 @@ BioAlignmentTest >> testIsReference [ self assert: align isReference. ] -{ #category : #test } +{ #category : 'test' } BioAlignmentTest >> testLast [ align := self sampleAlignment01. @@ -211,7 +213,7 @@ BioAlignmentTest >> testLast [ self assert: align last equals: self gammaSequence ] -{ #category : #test } +{ #category : 'test' } BioAlignmentTest >> testNumberOfBases [ align := self sampleAlignment01. @@ -219,7 +221,7 @@ BioAlignmentTest >> testNumberOfBases [ self assert: align numberOfBases equals: self alphaSequence size ] -{ #category : #testing } +{ #category : 'testing' } BioAlignmentTest >> testSequenceAsFastaString [ align := self sampleAlignment01. self @@ -234,7 +236,7 @@ ACTGCTAGATAG ' ] -{ #category : #testing } +{ #category : 'testing' } BioAlignmentTest >> testSequenceAsPhylipString [ align := self sampleAlignment01. self @@ -247,7 +249,7 @@ Gamma ACTGCTAGATAG ' ] -{ #category : #testing } +{ #category : 'testing' } BioAlignmentTest >> testSequenceNames [ align := self sampleAlignment01. @@ -257,7 +259,7 @@ BioAlignmentTest >> testSequenceNames [ ] -{ #category : #testing } +{ #category : 'testing' } BioAlignmentTest >> testSequenceStrings [ align := self sampleAlignment01. @@ -266,7 +268,7 @@ BioAlignmentTest >> testSequenceStrings [ equals: #('ACTGCTAGCTAG' 'ACT-CTAGCTAG' 'ACTGCTAGATAG') ] -{ #category : #testing } +{ #category : 'testing' } BioAlignmentTest >> testSequences [ align := self sampleAlignment01. @@ -275,7 +277,7 @@ BioAlignmentTest >> testSequences [ ] -{ #category : #testing } +{ #category : 'testing' } BioAlignmentTest >> testSize [ align := self sampleAlignment01. diff --git a/repository/BioTools-Tests/BioAlphabetTest.class.st b/repository/BioTools-Tests/BioAlphabetTest.class.st index fdf5ee7c..44af8d90 100644 --- a/repository/BioTools-Tests/BioAlphabetTest.class.st +++ b/repository/BioTools-Tests/BioAlphabetTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #BioAlphabetTest, - #superclass : #BioAbstractTest, + #name : 'BioAlphabetTest', + #superclass : 'BioAbstractTest', #instVars : [ 'alphabet' ], - #category : #'BioTools-Tests-Biological' + #category : 'BioTools-Tests-Biological', + #package : 'BioTools-Tests', + #tag : 'Biological' } -{ #category : #testing } +{ #category : 'testing' } BioAlphabetTest >> testTranslation [ self assert: ( BioIUPACDNA withAllSubclasses allSatisfy: [: alpha | alpha new canTranslate ] ). diff --git a/repository/BioTools-Tests/BioAssociationTest.class.st b/repository/BioTools-Tests/BioAssociationTest.class.st index 9ecfb903..aa249b47 100644 --- a/repository/BioTools-Tests/BioAssociationTest.class.st +++ b/repository/BioTools-Tests/BioAssociationTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #BioAssociationTest, - #superclass : #BioAbstractTest, - #category : #'BioTools-Tests-Core' + #name : 'BioAssociationTest', + #superclass : 'BioAbstractTest', + #category : 'BioTools-Tests-Core', + #package : 'BioTools-Tests', + #tag : 'Core' } -{ #category : #testing } +{ #category : 'testing' } BioAssociationTest >> testAsSequence [ self assert: (5438 -> 8) asSequence equals: ('ACCCATTC' asSequence alphabet: BioDNAAlphabet new). diff --git a/repository/BioTools-Tests/BioCodonTableTest.class.st b/repository/BioTools-Tests/BioCodonTableTest.class.st index b5941424..2c7d0bad 100644 --- a/repository/BioTools-Tests/BioCodonTableTest.class.st +++ b/repository/BioTools-Tests/BioCodonTableTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #BioCodonTableTest, - #superclass : #BioAbstractTest, + #name : 'BioCodonTableTest', + #superclass : 'BioAbstractTest', #instVars : [ 'table' ], - #category : #'BioTools-Tests-Biological' + #category : 'BioTools-Tests-Biological', + #package : 'BioTools-Tests', + #tag : 'Biological' } -{ #category : #running } +{ #category : 'running' } BioCodonTableTest >> setUp [ " Assure defaults " @@ -15,7 +17,7 @@ BioCodonTableTest >> setUp [ table := BioDNACodonTables atCodonTable: 1. ] -{ #category : #running } +{ #category : 'running' } BioCodonTableTest >> tearDown [ " Reset to defaults " @@ -23,7 +25,7 @@ BioCodonTableTest >> tearDown [ BioDNACodonTables atCodonTable: 1. ] -{ #category : #testing } +{ #category : 'testing' } BioCodonTableTest >> testAt [ self assert: ( table isKindOf: BioCodonTable ). @@ -48,7 +50,7 @@ BioCodonTableTest >> testAt [ self should: [ BioRNACodonTables atCodonTable: 5000 ] raise: BioException. ] -{ #category : #testing } +{ #category : 'testing' } BioCodonTableTest >> testCodonTables [ | tables | @@ -65,7 +67,7 @@ BioCodonTableTest >> testCodonTables [ ] -{ #category : #testing } +{ #category : 'testing' } BioCodonTableTest >> testDo [ | tempCodonTables | @@ -76,7 +78,7 @@ BioCodonTableTest >> testDo [ ] -{ #category : #testing } +{ #category : 'testing' } BioCodonTableTest >> testIsStartCodon [ | codonTable | @@ -93,7 +95,7 @@ BioCodonTableTest >> testIsStartCodon [ ] -{ #category : #testing } +{ #category : 'testing' } BioCodonTableTest >> testIsStopCodon [ | codonTable | @@ -110,7 +112,7 @@ BioCodonTableTest >> testIsStopCodon [ ] -{ #category : #testing } +{ #category : 'testing' } BioCodonTableTest >> testReverseTranslate [ | tempCodonTables translation translated | @@ -140,7 +142,7 @@ BioCodonTableTest >> testReverseTranslate [ BioDNACodonTables atCodonTable: 1. ] -{ #category : #testing } +{ #category : 'testing' } BioCodonTableTest >> testTableAllNames [ self assert: ( BioDNACodonTables tableAllNames isKindOf: Collection ). @@ -150,7 +152,7 @@ BioCodonTableTest >> testTableAllNames [ ] -{ #category : #testing } +{ #category : 'testing' } BioCodonTableTest >> testTableIdentifiers [ self assert: ( BioDNACodonTables tableIdentifiers isKindOf: Collection ). @@ -160,7 +162,7 @@ BioCodonTableTest >> testTableIdentifiers [ ] -{ #category : #testing } +{ #category : 'testing' } BioCodonTableTest >> testTableNames [ self assert: ( BioDNACodonTables tableNames isKindOf: Collection ). @@ -170,7 +172,7 @@ BioCodonTableTest >> testTableNames [ ] -{ #category : #testing } +{ #category : 'testing' } BioCodonTableTest >> testTranslateAmbiguous [ | tempCodonTables | @@ -192,7 +194,7 @@ BioCodonTableTest >> testTranslateAmbiguous [ ] -{ #category : #testing } +{ #category : 'testing' } BioCodonTableTest >> testTranslateUnambiguous [ | tempCodonTables | diff --git a/repository/BioTools-Tests/BioCollectionTest.class.st b/repository/BioTools-Tests/BioCollectionTest.class.st index 20aa3c1a..28baa84c 100644 --- a/repository/BioTools-Tests/BioCollectionTest.class.st +++ b/repository/BioTools-Tests/BioCollectionTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #BioCollectionTest, - #superclass : #BioAbstractTest, - #category : #'BioTools-Tests-Core' + #name : 'BioCollectionTest', + #superclass : 'BioAbstractTest', + #category : 'BioTools-Tests-Core', + #package : 'BioTools-Tests', + #tag : 'Core' } -{ #category : #testing } +{ #category : 'testing' } BioCollectionTest >> testAsBio [ | collection bioCollection | @@ -21,14 +23,14 @@ BioCollectionTest >> testAsBio [ ] -{ #category : #testing } +{ #category : 'testing' } BioCollectionTest >> testAsFileDirectoryCollection [ ] -{ #category : #testing } +{ #category : 'testing' } BioCollectionTest >> testAsLowercase [ self assert: 'This is A SAMPLE COLLECTION' asLowercase equals: 'this is a sample collection'. @@ -37,14 +39,14 @@ BioCollectionTest >> testAsLowercase [ ] -{ #category : #testing } +{ #category : 'testing' } BioCollectionTest >> testIsBioCollection [ self assert: (BioOrderedCollection withAllSubclasses allSatisfy: [ : cls | cls new isBioCollection ]) . self deny: OrderedCollection new isBioCollection. ] -{ #category : #testing } +{ #category : 'testing' } BioCollectionTest >> testIsBiologicalSequence [ self assert: 'ACGT' isBiologicalSequence. diff --git a/repository/BioTools-Tests/BioDNAAlphabetTest.class.st b/repository/BioTools-Tests/BioDNAAlphabetTest.class.st index 2adf2363..ce7a7281 100644 --- a/repository/BioTools-Tests/BioDNAAlphabetTest.class.st +++ b/repository/BioTools-Tests/BioDNAAlphabetTest.class.st @@ -2,12 +2,14 @@ A BioDNAAlphabetTest is a test class for testing the behavior of BioDNAAlphabet " Class { - #name : #BioDNAAlphabetTest, - #superclass : #TestCase, - #category : #'BioTools-Tests-Alphabets' + #name : 'BioDNAAlphabetTest', + #superclass : 'TestCase', + #category : 'BioTools-Tests-Alphabets', + #package : 'BioTools-Tests', + #tag : 'Alphabets' } -{ #category : #test } +{ #category : 'test' } BioDNAAlphabetTest >> testCanTranslate [ self assert: BioDNAAlphabet new canTranslate diff --git a/repository/BioTools-Tests/BioFastaMultiRecordTest.class.st b/repository/BioTools-Tests/BioFastaMultiRecordTest.class.st index be7cac81..6ee969fb 100644 --- a/repository/BioTools-Tests/BioFastaMultiRecordTest.class.st +++ b/repository/BioTools-Tests/BioFastaMultiRecordTest.class.st @@ -1,24 +1,26 @@ Class { - #name : #BioFastaMultiRecordTest, - #superclass : #BioAbstractTest, + #name : 'BioFastaMultiRecordTest', + #superclass : 'BioAbstractTest', #instVars : [ 'fastaCollection' ], - #category : #'BioTools-Tests-Core' + #category : 'BioTools-Tests-Core', + #package : 'BioTools-Tests', + #tag : 'Core' } -{ #category : #accessing } +{ #category : 'accessing' } BioFastaMultiRecordTest >> fastaCollection [ ^ fastaCollection ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaMultiRecordTest >> fastaCollection: aCollection [ fastaCollection := aCollection ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaMultiRecordTest >> multiFastaSeq [ " sequence2 is reverse complement of sequence1 " @@ -30,14 +32,14 @@ GCTAATGCCGTAGTAATTTTCCCGTCCTCCCGT ] -{ #category : #running } +{ #category : 'running' } BioFastaMultiRecordTest >> setUp [ super setUp. self fastaCollection: (BioParser parseMultiFasta: self multiFastaSeq). ] -{ #category : #testing } +{ #category : 'testing' } BioFastaMultiRecordTest >> testAddFastaRecord [ | oldFastaCollectionSize | oldFastaCollectionSize := self fastaCollection size. @@ -52,33 +54,33 @@ BioFastaMultiRecordTest >> testAddFastaRecord [ equals: oldFastaCollectionSize + 1 ] -{ #category : #test } +{ #category : 'test' } BioFastaMultiRecordTest >> testAsString [ self assert: (self fastaCollection asString isKindOf: String). self deny: self fastaCollection asString isEmpty. ] -{ #category : #test } +{ #category : 'test' } BioFastaMultiRecordTest >> testContents [ self assert: self fastaCollection contents equals: self fastaCollection. ] -{ #category : #test } +{ #category : 'test' } BioFastaMultiRecordTest >> testGcContent [ self assert: self fastaCollection gcContent notEmpty. self assert: (self fastaCollection gcContent isKindOf: Dictionary). ] -{ #category : #test } +{ #category : 'test' } BioFastaMultiRecordTest >> testHasSameLength [ self assert: self fastaCollection hasSameLength. ] -{ #category : #testing } +{ #category : 'testing' } BioFastaMultiRecordTest >> testIncludesFastaRecord [ | fastaRecord | @@ -93,7 +95,7 @@ BioFastaMultiRecordTest >> testIncludesFastaRecord [ self assert: (self fastaCollection includes: fastaRecord). ] -{ #category : #testing } +{ #category : 'testing' } BioFastaMultiRecordTest >> testIncludesName [ | fastaRecord | @@ -108,14 +110,14 @@ BioFastaMultiRecordTest >> testIncludesName [ self assert: (self fastaCollection includesName: 'Added Fasta Record 1'). ] -{ #category : #test } +{ #category : 'test' } BioFastaMultiRecordTest >> testIsEmpty [ self deny: self fastaCollection isEmpty. ] -{ #category : #testing } +{ #category : 'testing' } BioFastaMultiRecordTest >> testReverseComplement [ | newFastaCollection firstSeq sndSeq | @@ -134,7 +136,7 @@ BioFastaMultiRecordTest >> testReverseComplement [ equals: newFastaCollection sequences second asString ] -{ #category : #test } +{ #category : 'test' } BioFastaMultiRecordTest >> testSequenceNames [ self assert: self fastaCollection sequenceNames notEmpty. @@ -143,7 +145,7 @@ BioFastaMultiRecordTest >> testSequenceNames [ self assert: self fastaCollection sequenceNames first equals: 'sequence1'. ] -{ #category : #test } +{ #category : 'test' } BioFastaMultiRecordTest >> testSequenceStrings [ self assert: self fastaCollection sequenceStrings notEmpty. @@ -151,20 +153,20 @@ BioFastaMultiRecordTest >> testSequenceStrings [ self assert: (self fastaCollection sequenceStrings allSatisfy: #notEmpty). ] -{ #category : #test } +{ #category : 'test' } BioFastaMultiRecordTest >> testSequences [ self assert: self fastaCollection sequences notEmpty. self assert: (self fastaCollection sequences allSatisfy: #isBioSequence). ] -{ #category : #test } +{ #category : 'test' } BioFastaMultiRecordTest >> testSize [ self assert: self fastaCollection size equals: 2. ] -{ #category : #testing } +{ #category : 'testing' } BioFastaMultiRecordTest >> testSort [ | newFastaCollection | @@ -178,7 +180,7 @@ BioFastaMultiRecordTest >> testSort [ self assert: newFastaCollection isSorted. ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaMultiRecordTest >> unsortedMultiFastaSeq [ " From http://quma.cdb.riken.jp/help/multiFastaHelp.html " diff --git a/repository/BioTools-Tests/BioGenomeTest.class.st b/repository/BioTools-Tests/BioGenomeTest.class.st index 6aaedf23..05832904 100644 --- a/repository/BioTools-Tests/BioGenomeTest.class.st +++ b/repository/BioTools-Tests/BioGenomeTest.class.st @@ -1,23 +1,25 @@ Class { - #name : #BioGenomeTest, - #superclass : #BioAbstractTest, + #name : 'BioGenomeTest', + #superclass : 'BioAbstractTest', #instVars : [ 'genome' ], - #category : #'BioTools-Tests-Biological' + #category : 'BioTools-Tests-Biological', + #package : 'BioTools-Tests', + #tag : 'Biological' } -{ #category : #accessing } +{ #category : 'accessing' } BioGenomeTest >> genome [ ^ genome ] -{ #category : #accessing } +{ #category : 'accessing' } BioGenomeTest >> genome: anObject [ genome := anObject ] -{ #category : #running } +{ #category : 'running' } BioGenomeTest >> setUp [ " Assure defaults " @@ -25,7 +27,7 @@ BioGenomeTest >> setUp [ genome := BioGenome new. ] -{ #category : #testing } +{ #category : 'testing' } BioGenomeTest >> testChromosomes [ self assert: (self genome chromosomes isKindOf: self genome defaultCollectionClass) diff --git a/repository/BioTools-Tests/BioGenomicRangesTest.class.st b/repository/BioTools-Tests/BioGenomicRangesTest.class.st new file mode 100644 index 00000000..75701151 --- /dev/null +++ b/repository/BioTools-Tests/BioGenomicRangesTest.class.st @@ -0,0 +1,320 @@ +Class { + #name : 'BioGenomicRangesTest', + #superclass : 'TestCase', + #category : 'BioTools-Tests-Genomic-Ranges', + #package : 'BioTools-Tests', + #tag : 'Genomic-Ranges' +} + +{ #category : 'accessing' } +BioGenomicRangesTest >> sampleGenomicRanges01 [ + ^ BioGenomicRanges + seqnames: #('chr1' 'chr1' 'chr2') + starts: #(1 10 5) + ends: #(5 20 8) + strands: #('+' '-' '*') + metadata: Dictionary new +] + +{ #category : 'tests' } +BioGenomicRangesTest >> testAddMetadata [ + | gr | + gr := self sampleGenomicRanges01. + gr addMetadata: #(10 20 30) at: #score. + self assert: ((gr metadata at: #score) at: 2) equals: 20 +] + +{ #category : 'tests' } +BioGenomicRangesTest >> testAsBEDRoundTrip [ + + | gr out parsed | + gr := BioGenomicRanges + seqnames: #( 'chr1' ) + starts: #( 1 ) + ends: #( 10 ) + strands: #( '+' ) + metadata: (Dictionary new + at: #name put: #( 'n' ); + at: #score put: #( '1' ); + yourself). + out := gr asBEDString. + parsed := BioGenomicRanges fromBED: out. + self assert: parsed size equals: 1. + self assert: (parsed start at: 1) equals: 1. + self assert: (parsed end at: 1) equals: 10 +] + +{ #category : 'tests' } +BioGenomicRangesTest >> testAsDataFrame [ + | df | + df := self sampleGenomicRanges01 asDataFrame. + self assert: (df at: #seqnames) size equals: 3 + +] + +{ #category : 'tests' } +BioGenomicRangesTest >> testAsGFFRoundTrip [ + + | gr out parsed | + gr := BioGenomicRanges + seqnames: #( 'chr1' ) + starts: #( 5 ) + ends: #( 20 ) + strands: #( '+' ) + metadata: Dictionary new. + out := gr asGFFString. + parsed := BioGenomicRanges fromGFF: out. + self assert: parsed size equals: 1. + self assert: (parsed start at: 1) equals: 5 +] + +{ #category : 'tests' } +BioGenomicRangesTest >> testAtReturnsSingleRange [ + + | one | + one := self sampleGenomicRanges01 at: 1. + self assert: one start equals: 1. + self assert: one end equals: 5 +] + +{ #category : 'tests' } +BioGenomicRangesTest >> testBioStrandFrom [ + self assert: (BioStrand from: '+') isPlus. + self assert: (BioStrand from: '-') isMinus. + self assert: (BioStrand from: '*') isUnknown +] + +{ #category : 'tests' } +BioGenomicRangesTest >> testCopyWithSeqnames [ + | gr cp | + gr := self sampleGenomicRanges01. + cp := gr copyWithSeqnames: #('a' 'b' 'c'). + self assert: (cp seqnames at: 3) equals: 'c' +] + +{ #category : 'tests' } +BioGenomicRangesTest >> testCountOverlaps [ + + | a b counts | + a := BioGenomicRanges + seqnames: #( 'chr1' 'chr1' ) + starts: #( 1 20 ) + ends: #( 10 30 ) + strands: #( '+' '+' ) + metadata: Dictionary new. + b := BioGenomicRanges + seqnames: #( 'chr1' 'chr1' ) + starts: #( 5 25 ) + ends: #( 6 28 ) + strands: #( '+' '+' ) + metadata: Dictionary new. + counts := a countOverlaps: b. + self assert: (counts at: 1) equals: 1. + self assert: (counts at: 2) equals: 1 +] + +{ #category : 'tests' } +BioGenomicRangesTest >> testCreateFromLiteral [ + | gr | + gr := self sampleGenomicRanges01. + self assert: gr size equals: 3. + self assert: (gr seqnames at: 1) equals: 'chr1'. + self assert: (gr start at: 2) equals: 10 +] + +{ #category : 'tests' } +BioGenomicRangesTest >> testDisjoinAliasReduceV1 [ + + | gr dj | + gr := BioGenomicRanges + seqnames: #( 'chr1' 'chr1' ) + starts: #( 1 3 ) + ends: #( 5 7 ) + strands: #( '+' '+' ) + metadata: Dictionary new. + dj := gr disjoin. + self assert: dj size equals: 1 +] + +{ #category : 'tests' } +BioGenomicRangesTest >> testEmptyRanges [ + | gr | + gr := BioGenomicRanges seqnames: #() starts: #() ends: #() strands: #() metadata: Dictionary new. + self assert: gr isEmpty + +] + +{ #category : 'tests' } +BioGenomicRangesTest >> testExampleGRangesFromBioconductorPaper [ + | gr | + gr := BioGenomicRanges + seqnames: #('chr1' 'chr2' 'chr1') + starts: #(1 101 1001) + ends: #(100 200 1100) + strands: #('+' '-' '+') + metadata: (Dictionary new at: #score put: #(5 3 7); yourself). + self assert: gr size equals: 3. + self assert: (gr width at: 1) equals: 100. + self assert: (gr seqnames at: 3) equals: 'chr1' +] + +{ #category : 'tests' } +BioGenomicRangesTest >> testFindOverlapsDifferentSeqname [ + | a b | + a := BioGenomicRanges seqnames: #('chr1') starts: #(1) ends: #(10) strands: #('+') metadata: Dictionary new. + b := BioGenomicRanges seqnames: #('chr2') starts: #(5) ends: #(15) strands: #('+') metadata: Dictionary new. + self assert: (a findOverlaps: b) isEmpty +] + +{ #category : 'tests' } +BioGenomicRangesTest >> testFindOverlapsIgnoreStrand [ + | a b | + a := BioGenomicRanges seqnames: #('chr1') starts: #(1) ends: #(10) strands: #('+') metadata: Dictionary new. + b := BioGenomicRanges seqnames: #('chr1') starts: #(5) ends: #(15) strands: #('-') metadata: Dictionary new. + a ignoreStrand. + self assert: (a findOverlaps: b) size equals: 1 +] + +{ #category : 'tests' } +BioGenomicRangesTest >> testFindOverlapsSimple [ + | a b hits | + a := BioGenomicRanges seqnames: #('chr1') starts: #(1) ends: #(10) strands: #('+') metadata: Dictionary new. + b := BioGenomicRanges seqnames: #('chr1') starts: #(5) ends: #(15) strands: #('+') metadata: Dictionary new. + hits := a findOverlaps: b. + self assert: hits size equals: 1. + self assert: hits first key equals: 1 +] + +{ #category : 'tests' } +BioGenomicRangesTest >> testFindOverlapsStrandSensitive [ + | a b | + a := BioGenomicRanges seqnames: #('chr1') starts: #(1) ends: #(10) strands: #('+') metadata: Dictionary new. + b := BioGenomicRanges seqnames: #('chr1') starts: #(5) ends: #(15) strands: #('-') metadata: Dictionary new. + self assert: (a findOverlaps: b) isEmpty +] + +{ #category : 'tests' } +BioGenomicRangesTest >> testFlipStrand [ + | gr | + gr := self sampleGenomicRanges01 copy. + gr flipStrand. + self assert: ((gr strand at: 1) symbol) equals: #-. + self assert: ((gr strand at: 2) symbol) equals: #+ +] + +{ #category : 'tests' } +BioGenomicRangesTest >> testFromBED [ + | bed gr | + bed := 'chr1 0 10 x 5 +'. + gr := BioGenomicRanges fromBED: bed. + self assert: gr size equals: 1. + self assert: (gr start at: 1) equals: 1. + self assert: (gr end at: 1) equals: 10 +] + +{ #category : 'tests' } +BioGenomicRangesTest >> testFromGFF [ + | gff gr | + gff := 'chr1 src gene 5 20 . + . ID=g1'. + gr := BioGenomicRanges fromGFF: gff. + self assert: gr size equals: 1. + self assert: (gr start at: 1) equals: 5 +] + +{ #category : 'tests' } +BioGenomicRangesTest >> testIRangesRejectNegativeWidth [ + self should: [ BioIRanges starts: #(5) ends: #(4) ] raise: Error +] + +{ #category : 'tests' } +BioGenomicRangesTest >> testIRangesWidth [ + | ir | + ir := BioIRanges starts: #(2 10) ends: #(4 12). + self assert: (ir width at: 1) equals: 3. + self assert: (ir width at: 2) equals: 3 +] + +{ #category : 'tests' } +BioGenomicRangesTest >> testMetadataCanContainObjects [ + + | gr obj | + obj := Object new. + gr := self sampleGenomicRanges01. + gr + addMetadata: { + obj. + obj. + obj } + at: #sequence. + self assert: ((gr metadata at: #sequence) at: 1) identicalTo: obj +] + +{ #category : 'tests' } +BioGenomicRangesTest >> testOverlapWith [ + | a b c | + a := BioGenomicRanges seqnames: #('chr1' 'chr1') starts: #(1 50) ends: #(10 60) strands: #('+' '+') metadata: Dictionary new. + b := BioGenomicRanges seqnames: #('chr1') starts: #(5) ends: #(15) strands: #('+') metadata: Dictionary new. + c := a overlapWith: b. + self assert: c size equals: 1. + self assert: (c start at: 1) equals: 1 +] + +{ #category : 'tests' } +BioGenomicRangesTest >> testReduceKeepsStrandSeparate [ + | gr red | + gr := BioGenomicRanges seqnames: #('chr1' 'chr1') starts: #(1 2) ends: #(5 6) strands: #('+' '-') metadata: Dictionary new. + red := gr reduce. + self assert: red size equals: 2 + +] + +{ #category : 'tests' } +BioGenomicRangesTest >> testReduceMergesAdjacent [ + | gr red | + gr := BioGenomicRanges seqnames: #('chr1' 'chr1') starts: #(1 6) ends: #(5 10) strands: #('+' '+') metadata: Dictionary new. + red := gr reduce. + self assert: red size equals: 1. + self assert: (red start at: 1) equals: 1. + self assert: (red end at: 1) equals: 10 +] + +{ #category : 'tests' } +BioGenomicRangesTest >> testReject [ + + | gr selected | + gr := self sampleGenomicRanges01. + selected := gr reject: [ :r | r seqname = 'chr1' ]. + self assert: selected size equals: 1. + self assert: (selected seqnames at: 1) equals: 'chr2' +] + +{ #category : 'tests' } +BioGenomicRangesTest >> testSelect [ + + | gr selected | + gr := self sampleGenomicRanges01. + selected := gr select: [ :r | r seqname = 'chr1' ]. + self assert: selected size equals: 2 +] + +{ #category : 'tests' } +BioGenomicRangesTest >> testSetdiffSelfIsEmpty [ + self assert: self sampleGenomicRanges01 setdiff isEmpty +] + +{ #category : 'tests' } +BioGenomicRangesTest >> testShiftMinusOperator [ + | gr shifted | + gr := self sampleGenomicRanges01. + shifted := gr - 1. + self assert: (shifted start at: 2) equals: 9 +] + +{ #category : 'tests' } +BioGenomicRangesTest >> testShiftPlusOperator [ + | gr shifted | + gr := self sampleGenomicRanges01. + shifted := gr + 10. + self assert: (shifted start at: 1) equals: 11. + self assert: (shifted end at: 1) equals: 15 +] diff --git a/repository/BioTools-Tests/BioIUPACAmbiguousDNATest.class.st b/repository/BioTools-Tests/BioIUPACAmbiguousDNATest.class.st index 3911c8b2..6bd7fd68 100644 --- a/repository/BioTools-Tests/BioIUPACAmbiguousDNATest.class.st +++ b/repository/BioTools-Tests/BioIUPACAmbiguousDNATest.class.st @@ -2,12 +2,14 @@ A BioIUPACAmbiguousDNATest is a test class for testing the behavior of BioIUPACAmbiguousDNA " Class { - #name : #BioIUPACAmbiguousDNATest, - #superclass : #TestCase, - #category : #'BioTools-Tests-Alphabets' + #name : 'BioIUPACAmbiguousDNATest', + #superclass : 'TestCase', + #category : 'BioTools-Tests-Alphabets', + #package : 'BioTools-Tests', + #tag : 'Alphabets' } -{ #category : #tests } +{ #category : 'tests' } BioIUPACAmbiguousDNATest >> testCodes [ self assert: (BioIUPACAmbiguousDNA new codes bioHasEqualElements: 'GATCRYWSMKHBVDN' ). diff --git a/repository/BioTools-Tests/BioIUPACAmbiguousRNATest.class.st b/repository/BioTools-Tests/BioIUPACAmbiguousRNATest.class.st index 11fa3218..3fdabe00 100644 --- a/repository/BioTools-Tests/BioIUPACAmbiguousRNATest.class.st +++ b/repository/BioTools-Tests/BioIUPACAmbiguousRNATest.class.st @@ -2,12 +2,14 @@ A BioIUPACAmbiguousRNATest is a test class for testing the behavior of BioIUPACAmbiguousRNA " Class { - #name : #BioIUPACAmbiguousRNATest, - #superclass : #TestCase, - #category : #'BioTools-Tests-Alphabets' + #name : 'BioIUPACAmbiguousRNATest', + #superclass : 'TestCase', + #category : 'BioTools-Tests-Alphabets', + #package : 'BioTools-Tests', + #tag : 'Alphabets' } -{ #category : #tests } +{ #category : 'tests' } BioIUPACAmbiguousRNATest >> testCodes [ self assert: BioIUPACAmbiguousRNA new codes asSet equals: 'GAUCRYWSMKHBVDN' asSet. diff --git a/repository/BioTools-Tests/BioIUPACDNAExtendedTest.class.st b/repository/BioTools-Tests/BioIUPACDNAExtendedTest.class.st index dd8f14b0..e3e1cdef 100644 --- a/repository/BioTools-Tests/BioIUPACDNAExtendedTest.class.st +++ b/repository/BioTools-Tests/BioIUPACDNAExtendedTest.class.st @@ -2,12 +2,14 @@ A BioIUPACDNAExtendedTest is a test class for testing the behavior of BioIUPACDNAExtended " Class { - #name : #BioIUPACDNAExtendedTest, - #superclass : #TestCase, - #category : #'BioTools-Tests-Alphabets' + #name : 'BioIUPACDNAExtendedTest', + #superclass : 'TestCase', + #category : 'BioTools-Tests-Alphabets', + #package : 'BioTools-Tests', + #tag : 'Alphabets' } -{ #category : #tests } +{ #category : 'tests' } BioIUPACDNAExtendedTest >> testCodes [ self assert: (BioIUPACDNAExtended new codes bioHasEqualElements: 'GATCBDSW'). diff --git a/repository/BioTools-Tests/BioIUPACProteinExtendedTest.class.st b/repository/BioTools-Tests/BioIUPACProteinExtendedTest.class.st index e3f9049a..5a3500e5 100644 --- a/repository/BioTools-Tests/BioIUPACProteinExtendedTest.class.st +++ b/repository/BioTools-Tests/BioIUPACProteinExtendedTest.class.st @@ -2,12 +2,14 @@ A BioIUPACProteinExtendedTest is a test class for testing the behavior of BioIUPACProteinExtended " Class { - #name : #BioIUPACProteinExtendedTest, - #superclass : #TestCase, - #category : #'BioTools-Tests-Alphabets' + #name : 'BioIUPACProteinExtendedTest', + #superclass : 'TestCase', + #category : 'BioTools-Tests-Alphabets', + #package : 'BioTools-Tests', + #tag : 'Alphabets' } -{ #category : #tests } +{ #category : 'tests' } BioIUPACProteinExtendedTest >> testCodes [ self assert: BioIUPACProteinExtended new codes asSet equals: 'ACDEFGHIKLMNPQRSTVWYBXZJUO' asSet. diff --git a/repository/BioTools-Tests/BioIUPACProteinTest.class.st b/repository/BioTools-Tests/BioIUPACProteinTest.class.st index 64ded4ad..04fa6ac0 100644 --- a/repository/BioTools-Tests/BioIUPACProteinTest.class.st +++ b/repository/BioTools-Tests/BioIUPACProteinTest.class.st @@ -2,18 +2,20 @@ A BioIUPACProteinTest is a test class for testing the behavior of BioIUPACProtein " Class { - #name : #BioIUPACProteinTest, - #superclass : #TestCase, - #category : #'BioTools-Tests-Alphabets' + #name : 'BioIUPACProteinTest', + #superclass : 'TestCase', + #category : 'BioTools-Tests-Alphabets', + #package : 'BioTools-Tests', + #tag : 'Alphabets' } -{ #category : #test } +{ #category : 'test' } BioIUPACProteinTest >> testCanTranslate [ self deny: BioIUPACProtein new canTranslate ] -{ #category : #tests } +{ #category : 'tests' } BioIUPACProteinTest >> testCodes [ self assert: BioIUPACProtein new codes asSet equals: 'ACDEFGHIKLMNPQRSTVWY' asSet. diff --git a/repository/BioTools-Tests/BioIUPACUnambiguousDNATest.class.st b/repository/BioTools-Tests/BioIUPACUnambiguousDNATest.class.st index b04c93d5..611b79d7 100644 --- a/repository/BioTools-Tests/BioIUPACUnambiguousDNATest.class.st +++ b/repository/BioTools-Tests/BioIUPACUnambiguousDNATest.class.st @@ -2,12 +2,14 @@ A BioIUPACUnambiguousDNATest is a test class for testing the behavior of BioIUPACUnambiguousDNA " Class { - #name : #BioIUPACUnambiguousDNATest, - #superclass : #TestCase, - #category : #'BioTools-Tests-Alphabets' + #name : 'BioIUPACUnambiguousDNATest', + #superclass : 'TestCase', + #category : 'BioTools-Tests-Alphabets', + #package : 'BioTools-Tests', + #tag : 'Alphabets' } -{ #category : #tests } +{ #category : 'tests' } BioIUPACUnambiguousDNATest >> testCodes [ self assert: (BioIUPACUnambiguousDNA new codes bioHasEqualElements: 'GATCN'). diff --git a/repository/BioTools-Tests/BioIUPACUnambiguousRNATest.class.st b/repository/BioTools-Tests/BioIUPACUnambiguousRNATest.class.st index a38bad63..bb411f01 100644 --- a/repository/BioTools-Tests/BioIUPACUnambiguousRNATest.class.st +++ b/repository/BioTools-Tests/BioIUPACUnambiguousRNATest.class.st @@ -2,12 +2,14 @@ A BioIUPACUnambiguousRNATest is a test class for testing the behavior of BioIUPACUnambiguousRNA " Class { - #name : #BioIUPACUnambiguousRNATest, - #superclass : #TestCase, - #category : #'BioTools-Tests-Alphabets' + #name : 'BioIUPACUnambiguousRNATest', + #superclass : 'TestCase', + #category : 'BioTools-Tests-Alphabets', + #package : 'BioTools-Tests', + #tag : 'Alphabets' } -{ #category : #tests } +{ #category : 'tests' } BioIUPACUnambiguousRNATest >> testCodes [ self assert: BioIUPACUnambiguousRNA new codes asSet equals: 'GAUC' asSet. diff --git a/repository/BioTools-Tests/BioMutableSeqTest.class.st b/repository/BioTools-Tests/BioMutableSeqTest.class.st index 48ce35cf..fd0074ed 100644 --- a/repository/BioTools-Tests/BioMutableSeqTest.class.st +++ b/repository/BioTools-Tests/BioMutableSeqTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #BioMutableSeqTest, - #superclass : #BioAbstractSequenceTest, - #category : #'BioTools-Tests-Biological' + #name : 'BioMutableSeqTest', + #superclass : 'BioAbstractSequenceTest', + #category : 'BioTools-Tests-Biological', + #package : 'BioTools-Tests', + #tag : 'Biological' } -{ #category : #testing } +{ #category : 'testing' } BioMutableSeqTest >> testAppend [ | testMutSeq1 | testMutSeq1 := BioMutableSeq new. @@ -14,7 +16,7 @@ BioMutableSeqTest >> testAppend [ self assert: testMutSeq1 asString equals: 'ACTGACGTACACGT' ] -{ #category : #testing } +{ #category : 'testing' } BioMutableSeqTest >> testAsSequence [ | testMutSeq1 testSeq1 | @@ -27,7 +29,7 @@ BioMutableSeqTest >> testAsSequence [ ] -{ #category : #testing } +{ #category : 'testing' } BioMutableSeqTest >> testSetSequence [ | testMutSeq1 | diff --git a/repository/BioTools-Tests/BioNamedObjectTest.class.st b/repository/BioTools-Tests/BioNamedObjectTest.class.st index f282b67c..f1366c2e 100644 --- a/repository/BioTools-Tests/BioNamedObjectTest.class.st +++ b/repository/BioTools-Tests/BioNamedObjectTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #BioNamedObjectTest, - #superclass : #BioAbstractTest, + #name : 'BioNamedObjectTest', + #superclass : 'BioAbstractTest', #instVars : [ 'namedObject' ], - #category : #'BioTools-Tests-Core' + #category : 'BioTools-Tests-Core', + #package : 'BioTools-Tests', + #tag : 'Core' } -{ #category : #accessing } +{ #category : 'accessing' } BioNamedObjectTest >> setUp [ " Set up any named object for testing " @@ -16,7 +18,7 @@ BioNamedObjectTest >> setUp [ ] -{ #category : #testing } +{ #category : 'testing' } BioNamedObjectTest >> testAddDuplicateName [ namedObject name: 'accessionName1'. self assert: namedObject name equals: 'accessionName1'. @@ -28,7 +30,7 @@ BioNamedObjectTest >> testAddDuplicateName [ raise: BioDuplicatedObject ] -{ #category : #testing } +{ #category : 'testing' } BioNamedObjectTest >> testAddNameRemovesNullName [ namedObject := BioAccession new. @@ -39,7 +41,7 @@ BioNamedObjectTest >> testAddNameRemovesNullName [ ] -{ #category : #testing } +{ #category : 'testing' } BioNamedObjectTest >> testAddNames [ namedObject name: 'accessionName1'. self assert: namedObject name equals: 'accessionName1'. @@ -52,7 +54,7 @@ BioNamedObjectTest >> testAddNames [ equals: (OrderedCollection with: 'accessionName1' with: 'accessionName2') ] -{ #category : #testing } +{ #category : 'testing' } BioNamedObjectTest >> testAlphaName [ namedObject := BioAccession new. namedObject @@ -65,7 +67,7 @@ BioNamedObjectTest >> testAlphaName [ self assert: namedObject alphaName equals: String empty ] -{ #category : #testing } +{ #category : 'testing' } BioNamedObjectTest >> testEmptyName [ | nullName | nullName := 'Unnamed ' , namedObject class name. @@ -73,7 +75,7 @@ BioNamedObjectTest >> testEmptyName [ self deny: namedObject hasName ] -{ #category : #testing } +{ #category : 'testing' } BioNamedObjectTest >> testName [ namedObject name: 'accessionName1'. self assert: namedObject name equals: 'accessionName1'. @@ -83,7 +85,7 @@ BioNamedObjectTest >> testName [ equals: (OrderedCollection with: 'accessionName1') ] -{ #category : #testing } +{ #category : 'testing' } BioNamedObjectTest >> testNumericName [ namedObject := BioAccession new. namedObject @@ -97,7 +99,7 @@ BioNamedObjectTest >> testNumericName [ self assert: namedObject numericName equals: 425 ] -{ #category : #testing } +{ #category : 'testing' } BioNamedObjectTest >> testRemoveNullName [ namedObject := BioAccession new. diff --git a/repository/BioTools-Tests/BioPositionTest.class.st b/repository/BioTools-Tests/BioPositionTest.class.st index 7d0b7e0a..ce2839a2 100644 --- a/repository/BioTools-Tests/BioPositionTest.class.st +++ b/repository/BioTools-Tests/BioPositionTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #BioPositionTest, - #superclass : #BioAbstractTest, + #name : 'BioPositionTest', + #superclass : 'BioAbstractTest', #instVars : [ 'position' ], - #category : #'BioTools-Tests-Core' + #category : 'BioTools-Tests-Core', + #package : 'BioTools-Tests', + #tag : 'Core' } -{ #category : #testing } +{ #category : 'testing' } BioPositionTest >> testNewPosition [ position := BioLocus new @@ -19,7 +21,7 @@ BioPositionTest >> testNewPosition [ ] -{ #category : #testing } +{ #category : 'testing' } BioPositionTest >> testNewPositionWithRange [ position := BioLocus new @@ -32,7 +34,7 @@ BioPositionTest >> testNewPositionWithRange [ ] -{ #category : #testing } +{ #category : 'testing' } BioPositionTest >> testSetStartEnd [ position := BioLocus new diff --git a/repository/BioTools-Tests/BioSeqRecordTest.class.st b/repository/BioTools-Tests/BioSeqRecordTest.class.st index 9bdf0bf5..91a30ade 100644 --- a/repository/BioTools-Tests/BioSeqRecordTest.class.st +++ b/repository/BioTools-Tests/BioSeqRecordTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #BioSeqRecordTest, - #superclass : #BioAbstractTest, + #name : 'BioSeqRecordTest', + #superclass : 'BioAbstractTest', #instVars : [ 'seqRecord' ], - #category : #'BioTools-Tests-Core' + #category : 'BioTools-Tests-Core', + #package : 'BioTools-Tests', + #tag : 'Core' } -{ #category : #testing } +{ #category : 'testing' } BioSeqRecordTest >> testAnnotations [ seqRecord := BioSeqRecord new: (BioSequence newDNA: 'ACGT'). @@ -42,7 +44,7 @@ BioSeqRecordTest >> testAnnotations [ ] -{ #category : #testing } +{ #category : 'testing' } BioSeqRecordTest >> testAnnotationsClass [ seqRecord := BioSeqRecord new: (BioSequence newDNA: 'ACGT'). @@ -52,7 +54,7 @@ BioSeqRecordTest >> testAnnotationsClass [ ] -{ #category : #testing } +{ #category : 'testing' } BioSeqRecordTest >> testCopySeqFrom [ seqRecord := BioSeqRecord new: (BioSequence newDNA: 'MKQHKAMIVALIVICITAVVAALVTRKDLCEVHIRTGQTEVAVF'). @@ -65,7 +67,7 @@ BioSeqRecordTest >> testCopySeqFrom [ ] -{ #category : #testing } +{ #category : 'testing' } BioSeqRecordTest >> testCopySeqTo [ | editedSeqRecord | @@ -81,7 +83,7 @@ BioSeqRecordTest >> testCopySeqTo [ ] -{ #category : #testing } +{ #category : 'testing' } BioSeqRecordTest >> testCreate [ seqRecord := BioSeqRecord new: (BioSequence newDNA: 'ACGT'). @@ -99,7 +101,7 @@ BioSeqRecordTest >> testCreate [ ] -{ #category : #testing } +{ #category : 'testing' } BioSeqRecordTest >> testEquality [ | tmpSeqRecord | @@ -118,7 +120,7 @@ BioSeqRecordTest >> testEquality [ self deny: tmpSeqRecord = seqRecord description: 'Test different id'. ] -{ #category : #testing } +{ #category : 'testing' } BioSeqRecordTest >> testLetterAnnotations [ | tmpSeqRecord | @@ -149,7 +151,7 @@ BioSeqRecordTest >> testLetterAnnotations [ self assert: seqRecord letterAnnotations size = 0. ] -{ #category : #testing } +{ #category : 'testing' } BioSeqRecordTest >> testSequence [ seqRecord := BioSeqRecord new: ( BioSequence newDNA: 'ACGT' ). @@ -158,7 +160,7 @@ BioSeqRecordTest >> testSequence [ self assert: seqRecord sequence asString = 'tcga'. ] -{ #category : #testing } +{ #category : 'testing' } BioSeqRecordTest >> testSetIdAndDescription [ seqRecord := BioSeqRecord new: (BioSequence newDNA: 'ACGT'). diff --git a/repository/BioTools-Tests/BioSequenceTest.class.st b/repository/BioTools-Tests/BioSequenceTest.class.st index e8e75366..c94f35ea 100644 --- a/repository/BioTools-Tests/BioSequenceTest.class.st +++ b/repository/BioTools-Tests/BioSequenceTest.class.st @@ -1,23 +1,25 @@ Class { - #name : #BioSequenceTest, - #superclass : #BioAbstractSequenceTest, - #category : #'BioTools-Tests-Biological' + #name : 'BioSequenceTest', + #superclass : 'BioAbstractSequenceTest', + #category : 'BioTools-Tests-Biological', + #package : 'BioTools-Tests', + #tag : 'Biological' } -{ #category : #accessing } +{ #category : 'accessing' } BioSequenceTest >> alphabetClass [ ^ BioAlphabet ] -{ #category : #test } +{ #category : 'test' } BioSequenceTest >> testAccessionName [ self sequence accessionName: 'ABC234.1'. self assert: self sequence accessionName equals: 'ABC234.1'. ] -{ #category : #test } +{ #category : 'test' } BioSequenceTest >> testAddSeqFeature [ | seqFeature | @@ -27,7 +29,7 @@ BioSequenceTest >> testAddSeqFeature [ self assert: (self sequence sequenceFeatures includes: seqFeature). ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testAddToAlignment [ | align1 | @@ -40,7 +42,7 @@ BioSequenceTest >> testAddToAlignment [ self assert: (align1 sequenceStrings includes: 'ACAGTAGCTAGC') ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testAllButFirst [ | seqWithoutFirst seqStringWithoutFirst | @@ -52,7 +54,7 @@ BioSequenceTest >> testAllButFirst [ ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testAllButLast [ | seqWithoutLast seqStringWithoutLast | @@ -64,13 +66,13 @@ BioSequenceTest >> testAllButLast [ ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testAlphabet [ self assert: (self sequence alphabet isKindOf: BioAlphabet). ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testAlphabetCodes [ sequence := BioSequence newAmbiguousDNA: 'ACAGTAGCTAGC'. @@ -79,7 +81,7 @@ BioSequenceTest >> testAlphabetCodes [ self assert: sequence alphabetCodes equals: 'ABCDGHKMNRSTVWY' ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testAmbiguityCodes [ sequence := BioSequence newAmbiguousDNA: String empty. @@ -101,13 +103,13 @@ BioSequenceTest >> testAmbiguityCodes [ self assert: (sequence ambiguityCodes includes: $N). ] -{ #category : #test } +{ #category : 'test' } BioSequenceTest >> testAminoacidNames [ self assert: (self sequence aminoacidNames bioHasEqualElements: #('Cysteine' 'Alanine' 'Glycine' 'Threonine' 'Cysteine' 'Alanine' 'Threonine' 'Glycine' 'Cysteine' 'Threonine' 'Alanine' 'Glycine')). ] -{ #category : #test } +{ #category : 'test' } BioSequenceTest >> testAsFastaRecord [ | fastaRecord | @@ -118,13 +120,13 @@ BioSequenceTest >> testAsFastaRecord [ self assert: self sequence asFastaRecord equals: fastaRecord. ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testAsLowercase [ self assert: (self sequence asLowercase asString allSatisfy: [: car | car isLowercase ]). ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testAsMutableSequence [ | testSeq1 | self assert: self sequence asString equals: self sampleDnaString01. @@ -140,7 +142,7 @@ BioSequenceTest >> testAsMutableSequence [ self assert: (testSeq1 at: 2) equals: $G ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testAsNumber [ self assert: ('AGT' asSequence alphabet: BioDNAAlphabet new) asNumber equals: 12. @@ -149,7 +151,7 @@ BioSequenceTest >> testAsNumber [ self assert: ('GGCGGTTGCACCAGATGA' asSequence alphabet: BioDNAAlphabet new) asNumber equals: 44759798329. ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testAsString [ | seqString | @@ -161,14 +163,14 @@ BioSequenceTest >> testAsString [ ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testAsUppercase [ self assert: (self sequence asUppercase asString allSatisfy: [: car | car isUppercase ]). ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testAt [ self assert: (self sequence at: 2) equals: $A. @@ -179,7 +181,7 @@ BioSequenceTest >> testAt [ ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testBackTranscription [ | testSeq1 backTranscribedSeq | @@ -195,7 +197,7 @@ BioSequenceTest >> testBackTranscription [ self assert: backTranscribedSeq asString equals: self sampleDnaString01. ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testBuildFrequencies [ self assert: ((('ACGCGGCTCTGAAA' asSequence alphabet: BioDNAAlphabet new) buildFrequencies: 2) hasEqualElements: #(2 1 0 0 0 0 2 2 1 2 1 0 0 1 1 0)). @@ -205,20 +207,20 @@ BioSequenceTest >> testBuildFrequencies [ self assert: ((('ACTTCGCCTAAGTCATTTATCCCGTGGTACGACGCTCCCTTACAGTCTTATATCCCGGTATATACGCAGAAATGCCTACGTCCCCTCGTCCCACACACCAGGGAAGCTGAAATCGCTCATCTACTATGCGTGTACTTCCGGACGAAATCGTCGTCGGCTTCTGTCTGGCGCTGGAGATCCGGGCTTCTTGAGGGACACACCCATTATGACCGTTACAGGACTTACAACTACTCTGAGCAATGATGGTGCTCTGTAACGAACAAACGCACTCACCTCTGTTTCCTGTATGACATCCTCAAATGGATCGACCGTGATGTACTGAGCGAATAAGTGCGGATTACATTTATAGTCAGCTACATTTATTCGCCGCTCGGAGCAGAGTATAATGAATTTATACCACTTGTTAGACTCCTTCTCGCATTTAGCCCCTACCGCAAGTCGGAGCGTTGGGGTGCAATAGAGTTTTCAGTATCTACGTACCGTTAAGTCTCTCGCGTTCTTTCAGCAGGCATCAATATGTTGCTTGCTGTGGGGTCGGGTGGGGCGGAGAGCCAATAAAGTGCATCGGAATTGGCTGCCCTCCTACGAATCCGCAAGATGCGGTGATGCTACGTGATTATGACTACTAGCTTAGTCCC' asSequence alphabet: BioDNAAlphabet new) buildFrequencies: 6) hasEqualElements: #(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 2 0 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 2 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 1 0 1 0 0 0 0 1 0 0 1 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 2 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 2 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 1 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 1 0 0 0 0 1 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 1 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 1 1 0 1 0 0 0 0 1 0 0 1 0 1 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 1 1 0 0 1 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 1 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 1 1 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 1 0 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 2 0 0 0 0 0 1 0 0 1 2 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 1 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 1 1 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 1 0 1 2 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 1 1 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 1 1 0 0 0 1 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 1 0 1 0 0 3 2 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 0 1 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 0 0 2 0 0 0 0 1 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 1 0 0 0 0 1 0 0 0 0 2 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 1 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 1 0 1 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 1 1 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0 1 0 0 1 0 0 0 0 0 1 0 0 0 1 0 0 0 0 2 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 1 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 2 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 1 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 1 1 0 0 1 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 2 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 1 0 0 0 2 0 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 1 1 0 0 0 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0 2 0 0 0 0 0 0 1 0 0 0 0 3 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 1 0 0 0 1 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1 0 0 0 1 0 1 0 0 1 0 2 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 1 0 0 1 1 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 2 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 2 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 1 1 1 0 1 0 0 2 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 2 1 0 1 0 0 2 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0)) ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testClumpFindKLengthTimes [ self assert: (('GATCAGCATAAGGGTCCCTGCAATGCATGACAAGCCTGCAGTTGTTTTAC' asSequence clumpFindK: 4 length: 25 times: 3) asArray hasEqualElements: #('TGCA')). self assert: (('CCTAGCACGGGTACACACCCCTCGGGTGACTGTGTTCCCTACTAATGGAGTAATCGAATAAAGTAGTATGTGAAATCACCAATACTTTCAGTGTTTCATGCATGCCTGAATTTCATTTACGGCAAGCTAACATCGATGTTTTGGTAGATGAGACACTGCACACACGATAAACTAGACGGAGCTGGCAGACGTCAATATGTAACCCAGTAATACGGTTATCACCGAGGTTTGTTAATAACGATAATTGTCCCTTGTCTGGGGTTGCCGCGCCAGCCTGGAACGTGAAATCCGCCTCCGACCTGAAATCCGCTCGAAATCCGCCTCTGCGAAATCCGCCCCCGAAATCCGGAAATCCGCGGTCCGACCTCCGACCTCTCATTCAGAAATCCGCCGGAGAGAGCTTCCGGTCTCAACGAGAGCCACGAGAGCCCCGACGAGAGCCAGAACGAGAGCCGAAATCCGACGACGAGAGCCGCCCCTCAGAAATCCGCTGTTTAAAACGAGAGCCGACACGAGAGCCCCTCCGATCCGACTCCACGAGAGCCCGCAAATCACGAACGAGAGCCCCTCATCCGCCCCAAGCCAAGTTGGTCCGACCTCTCGTTTGTAACAGAAATACGCCAAGTTGGCGAGAGCCGCCGACCGCCAAGTTGGGAGAGCCACCAAGCCAAGTTGGCAAGTTGGCAAGTTGGCCTGGAAAGAACGAGAGCCAAGTCCAAGTTGGCGATTTAATAGTACGAGAGCCCAATCCGCTACATACACGAGCCAAGTTGGTCCGCGACGAGAGCCAAATCCGCCGACCTCTGGCAGTCGGTTTCCGACCTACGAGAGCCGACGAGAACGAGAGCCATCCCCAAGTTGGAGACGACCAAGTTGGCCCCACGAGAGCCACGACCCAAGTTGGGAAAATACCCAAGCCAAGTTGCCAAGTTGGAAGTTGGAGTTGGAGTTGGGAGAGCCTTCCAAGTTGGAGTTGGAGTGAGAGTTCCGAGGCACCTGCTAAAATCTCCCAAGTTGGGGCACCACCAAGTTCCAAGTTGGTGCCAAGTTGGTGACGCTCACATCCAACCAAGTTGGCCCAAGTTGGTAACCAAGTTGGGCGTAGTCAAACGCCGTATTGCCGTATTCGTTGGCCGTATTCAGCTTCGCCGCCGTATTCCAGCGCCGTATTCTATTCATTCGCTTGATCTACAGGGGATTTAACGAGTCCGCCGTATTCCTCTGATTCAGACGTTTAGGCAACAGCCAACCTGCAAGGCCGTATTCTAACGCCGTGCCGTAGCCGTATTCTGGTATAGTGGGCCGACAGGAGCCGTATTCAATCCCCTAGAAGCACTGCCGTAGCCGTATTCGATATGGTCGATGTGCCGTATTCATTCATCATTGCCGTATTCCGCCGTATTCCCGATGCCGTATTCAGCCGTATTCTCTTGGCCGTATTCGTTGTACGCCGTATTCTTTATTATTTGCGCCGCCGTATTCGTATTCTCTTCAATCATAACGGGCGCCGTATTCCCGTCAAGTGACTTATAGGCCGTATTCCCTATCAAGGCAAGGCTACCCTTATTTAAAGCCACCGGCCGCCGTATTCCCAATACTTAGGGCTGTGGGTCGAGGCCGTATTCGCCGTATTCTGAATCAAAAGGAGATTCTTCTCTTGACGCACTCTACACAGTTACTCGAGTCAGCCGTATTCATTCAATTCGCCACAATATCAATGCGACGGTTTTGTTAGTCCAGCAAGACCAATGTCGTTCATGATATCCTTTAAAAGACGGTCCGATACCTTTAAAAACCTTTAAAACTTTCCTTTAAAAACTTACCATAGGCTAGCCCATTGAGACTCCTTTCCTTTAAAACTGAGCCTTTAAAAAAAACCTTTAAAAGCAGCATCCCCTTTAAAACTTTAAAAAACCCCCTTTAAAACGTGTCCCTCCCTTTAAAAATCTCACGAGCTCTCGTACCGCAACCTTTAAAATGCCCCTTTAAAATGCCTTTAAAATGCCTTTAAAATGGCCTTTAAAAACCCTTTAAAAGAGACATTAGTGGTTGCTAAAAGTGGTTGCGGTTGCTCAGTGGTTGCGTTTGAGTGGTTGCGGTAGTGGTTGCCTTTAAAATTGGCGAAGCTACATCCCTTTAAAAGTGGTTGCCCACCTGCCTACAGCGTTAGTAGTAGTGGTTGCTTCAGTTAGTGGTTGCTTCTTAGTGGTTGCGATGGCACCTTTAAAATAAAAAGTGGTTGCCCAGTGGTTGCCTTAGTGGTTGCATTTAAAACGCGGTAAGCCTTTAAAAAAGTGGTTGCACAACCTGCCTACCTTTAAAATTAAAATGAAAGGCCTTTAAAGAGTGGTAGTGGTTGCGTTGCATATACGAGTGGTTGCAGTGGTTGCTCTCAACGAAGTGGTTGCTGCACCCCATAAGTGGTTGCGGTGAGGTGTCCCAGTGGTTGCCATCTAGCAAGTGGTTGCATCTAAAACGGCGTTAGTGGTAGTGGTTGCATGCGTGGCCAATAATGCGTGACGCGGCAGTGGTTGCATGCGTGCGTGACCAAGATGGATTAATGCTAATGCGTGCAGTGGTTGCGGCCTGTAATACTTGCGCTAGTGGTTGCTGTAATTAAAGTGGTTGCGTGATAATGCGTTAATGCGTGGACGATGGTCCGGTTAATGCGTGCCTGACATGAAAGCTGCTAATGCGTGCATAAAGTTGTCCCCACCCGTATCGCGCCGATTGTAATGCGTGGGTGGTTTGGTCTTGCCGCTCCGACCGAGTATTCCATGCGATAATGGTGAAGATAATGCGTGATTGTGCTAATGCGTGGTGTGGGACGTCTTTGGAGGTTTGGGAATTGAATAGTTCATCATCCTGATATTATAATGCGTGGCAAGTAATGCGTGATGCGTGTAATGCGTGTATGAGGAGCTAATGCGTGGTATAATTAATGCGTGATGCGTGTAATGCGTGGTCTAATGCGTGACCGTTCATATTTCCGTCGTGAGGCCAAGTTGATGCACGTACGGCAGTAATGCGTGTGCGTGCGTACTTCATTTGTCCTTAATGCGTGAGGTTCGCCTAACGATGACCTGGCGTGCCCTGCTGGACACGACCAGTTGAGTTTACCCGCCCTTAAGGGTGCTTTGTGGATTATTGTGTTCACCTTGCTAGAGCTTTGCCAGCGATGATGACGTGGCACGAGGCGGGTGTAAAAGTCTTTTTAGGTTGGTCAATTTCCATCTGATGCATTCAACAGTGAGTTGTCGATAAAAACTTTTGGCCGGGTTTGTTACTGCCCGGATGGGTTGACAGCGGTGGTCTAGCTGATCTAATTATAAGGACGGTTCGCGTCGTAACATGGGCGAAGCGACCGTCTTTAATGGAGCGCTAGATCAGCCTAACGTTATGCTATCGCTATGTACGGGTCAGTACCCGACAGGCACCGATCGAAACCTCTCTCCATTTACGTCAAGTACTATAACGCGGGCTCCTGTCTCGGCGCAGAGACAGTAGTTCGCGTTTTCTAACCCCCAATGAGAGCCTTACAGGGAACTACCGAAACCTCTGAAAGTTCGCTTGCGATCGTAGTGAGACTGATGGCCCACGGGACAAGCCCGTTAAGATTGCGCTTCCCCCAAGACCAAGGGTCCAGAGCATGAGTAGGTCGATAACCGCGAATCTCGGAGCGGTGCAACACAGGATATCTCGGCATTGGCTCTCGTTGTGCAGCAATTAGTGCTTCGACTCAACATATTCCGCGGCCTCTCAAATCTTCTCGCAAGGTCACGCGGAGTCCTTTTTATTGTTGGTCTGCAATAACTTTATCACATCACTCACTTATGGCGCTCGGGACCCCTCCTTCGTGGCTTATGATGCAGGACATGATAACATCATGTGGCCATACTAAGTATGCGAACGCGTATCCATGTGAAGCTGTTTAACCGTTGGTAGAAACAATGATTGTTTGTTACATATGCAGAATACCTACCGCAATAATATCGGTCATTAACCTGTGGCTTCCAAGCTCCAACCGATTGAGGGGGGGATAATACAGCATAACACTGGGTGGCCCTTGAAGACACGTATCCTATGTAGCACTACTGGAAGGATCTGGTCCAGATAACCGCGAGTACTGATTTGGGCGTTTCTGGCAATCACGATCTGGTTGCGAGTTGCGATCCGATCTGGGAACCCGTTGCGAGTTGCGATCCGATCTTACAAAGTCTGTACGCTGAGTGAACGGCGGGTTGCGATCGAATGGCGTCTCCTCACTTGCATTTGTTGCGATCGCCCGCCTCGTTGCGATCATGGTCAAAAAACAAACAAGTTGCGATCTCATGTTGCGATCCGATCATGAAGCCACATGACGTTGCGATCTGGTTGCGATCAACCTGGTTTCTCGGCGTTGCGATCCGCTGGAGGCGTTGGGTTGCGATCCAATGCTGAACGAAAAGCCCAGAGCGTCAAAAGGTTGCGATCTCTACACGCCTTACGCCGTAGGTTGTTGCGATCGTGGTAAACGGGGTTGCGATCAATAGTTGCGATCTCTGTTGTTGCGATCTAGTAACCAGGATGTTGCGATCGCCTTGATATTACACGGCGTGTTGCGATCTGTGTTGCGATCGTTGCGATCTTCTCTTCTGTTTACTACTGCTTATGGTCGTAGGCTGAACATCGAGTTGAAGGTTGCGATCACTGGTTCCGAACCCGTGAGGTTGCGATCCACATAAGAGGTTGCGATCTCAAAGGCTCTTCTTGCGAGGCCACGGTTGATGCCTCCAGATCGGCATCCTAAAATAGCTGGGGCCGGCTTATTCATCCACTAATTCTACCTCAAGTCTGACGGTCTAGATCCCCATTTTCCGAGTGGCGTGTCGCCCACGACCGACACCTTTCGCAGTCACGACCAGCCTGACAGACGCACATAGGAGAGTGTCGCGTAGTACCTGGCACAGGTACAAGCCAGTTTTTCCGACTGGAACGGGAGGCCAGAACACCGTAATAACCAGTCAATAATTACCGCCAATCTAACTCACATGGCACCCGAACGTTTCGAGCTTCCCTGTTGGTTTGGCCAGGTGACCTTACCGCCCATGTGATGGTGATATCTGGCCACGTTAGACCCTGGAGGTATGGACAATATATCGGGGACTTAAACCATCGCATCACTGAGGGAATCCGTTCATACTAAATAGAGTCCAAATTTATGGATCCTATAAGCGTAGCCGAGTTACATTTGTTAGTTGGGTATCTGATGGATCCTTCTTCTAGATAGGCGACTAGAAACCCCTGTGTGTTCATATTTAATGCGGCTAGTTGCGTCATAAGCTGCGCTACCGCTACCTAAGACCTGAGGACAAGTGGCCGCCATGGCCGAAGTGTTGTCTTAGCTGTCTGATACTGCAGGGACTGCACCTCCTTCGTCCTGCGTAGACAAAGTACATTTATTGGATACAAGTGTTGGCAACCAACGCGTACATAGTGTGGTACTTTGGCGACTCACAGGAAACAAACGTGCACGAGCTTCTACGGGGCATAAGCGGGTTCACGAGCTTCTATAGTGTCAATTAGCACGAGCTTATTCGGCCGGGTAAATCTGGAGGTTTCAGCCACGAGCTTAACCACGAGCTTGAGCTTAACCCGCCACGAGCTTCGTATGCAACCACGAGCTTTTAGCGGTCGGAGGTTGCTGCTGTCCACGAGCTTACGAGCTCACGAGCTTCCACGAGCTTACCTGGCGGAAAGGTACGTGCTTATCTAGTCGCGAGAGGTGAGCCTTTGCGCGTCAGTCTAACACACGAGCTTGAGCTTGAGCTCACGAGCTTGACCCCACGAGCTTCGCCGTGTCTACGCTGTACTCACGAGCTTGCTTCGAGCTTCTAGAAATGGGCACGAGCTTGCGAGGGATGTATCCTATTACACACGAGCTTCGAGCTTTTAACTGACCCGTAATCGGTCAGCGCGCACGAGCTTGGAGCTTCCACCACGAGCTTCACGAGCTTCTTGTCCTGAAAAATTTGACGACTCAAGGTTCGTGTGGAATCGTTTCTCCCACACGAGCTTGTAGTTTTTGGTTCTCTACCGAAGTCTAGTCGTTCCACACGAGCTTTTCGGGGTTTGAAGTGGCTGACCATACGCCATAACGGGGCAGTTCTCTCCGTCCATCGCTGATTTTAAGATTGGGCAGGGCCGGAGAACGTTCAGCCGGCGGAGTCGACCACTGGCTGACAATACATATTGCTTCATATTACGTTATAACTCATTCATGTCAACCAACGTCCGGGTTTGGTGGTCGGGGGTACCGGAGACTTGTCGTTACCAACTTGGTAATTCAGTTACGATTGAATCATATTCTGATGCATTTCTAGGTATTTTGCTTCACCTCTTTGGCATGCAATAAATCTTTATTAGGCTAAAGCCCAAAAATCAAGTTTACCCCGCGAGTATACTAGCTCCGGAAAAGTAGATTCTATATACCGTATACTGTCGCACTGCAGCCCTTATCTACCCTCCAGATGTAGTGCCGAGAGGCAACGTGATTACTATTTCGGTGGGCTACGATCGTGATTACGCGCGTGATTACGACGTGATTACCTCGCAAGATGGTTATCGTGATTACGATTACAATACATCTATGGCTCGTGATTACGATTACTTCGAAAGTTGTACCCTGCTCAACTGCCGCCACCGTGATTACGTGATTACTTACCTAGATAGGATCGTGGTAGATCGACCCTAGATACCTAACTTCCGCGTGATTAGATGAATAGGAATAGCAGGTCCGGATGAATAGAATGTCGTGATTACATCGAGATGATGAATAGAGACGTGAGATGAATAGCGTGATTACGATTACCGGATGAATAGGGAGATCAAGTTGCACTGCGTGAGTCCAGTAAGATGAATAGCGCCCAAAAGGCGTGATTACGATGAATAGCGCCCGATGAATAGAGATGAATAGCTTAGGGGCGTGATTACCGATGAATAGATTTCGATGAAGATGAATAGATGAGATGAATAGGAGTCGATGAATAGATGAATGATGAATAGCCCCAAAGGGCCAGATGAATAGGACCAATAGATGAAGATGAATAGATTACTACGATGAATAGGAATAGGGCCGGATGAAGATGAATAGTGAGATGAATAGCACCTGAGATGTGGAGTGAGTCGTGGGATGAATAGGTGTACCCATGCAGGTTCCCAAGAGGACGCAGATGAATAGAATCACCTCGAATCGAGCCTCCTGCGACGCGAGGGATCGGATGAATAGACATAAACTCGTTCGAACTCCGGCAGGAGATGAATGATGAATAGAATAGTATTGGGTTACCTGCAAGACCTAAATCATCGAATGACTACCCATAGAGCTATGACACGTCTATGAGGTCGAGTAGGACATTAGTCCCATGTTGATAGGGGGTCCTTTCCCCACTGCATACGTCTTTTAGGGCGGTAGGCATCATTAACCTATGACAGCTGCCAAAGAATCTTCCATCGCCAACATACTCCCCCAGTAGCCCACGGTAGTAATCATAAACCTTCCACCGACCAGAGTTTTTCCAAGACGGTTCGAAGCCACACCAATAAATCACGAGGTTAGAGTAGAAGGTCCGACGTGGGGGGCATTCTCCTTGACGAGACCCATCCTCACGAGCGTCCCCTCCTTAAAGGGACGGAAGGATTGCGTTGTTGTTACCCAACTAAGACACCAATCCCATTTGCCACCCCCCGCCCTCCCGAGTCTGTCTATAGCGCAAGTCGTTGAGCTGTCTTCCATTCCAAGCCTTCCGCGAGTAGGTAGGATCGACTTCGATCTGTCATTGTACTGGTTTAAATTCTTTTTTGGCAAATTCATAGTAGCGAGATGCACCCCGAAGACCACATTAGACCCTTGTATCTTCTCTCTTGGACGCTCAAGCCCTTGCTTTCCCACTCTACTTGTTGGATAAGTCCGTTTAAATTTTCGAACCTTCGTAAGAGTGCACTACGTTACACCTTACGTAGAAAATTCCTGACGGGCACCTTTGTTTTGAACCGACCTCGTATTTCGGATAGGCGTGCTCCAGTGAAGTAACCTAGCCGAAGCATGTATTCTTGAGCCCCCTTTTTCACCATCGGTTCCAGCGCTAGTCTTCCAGCGCGGCCTTCCAGCGCTTCCAGCGCATTCCAGCGCATCGTTTCCAGCGCCGCCTCGGGTGCGTTCATCACAGGTAACCCGCATTCCAGCGCCAGCTTCCAGCGCGCTGTATGTTCCAAATTTCCTTCCAGCGCTCCAGCGCCGCGCTCCAAATAGTGGCGAACGGACATAGCGCGATGGTTGAAGCGTATTCCAGCGCGCCATTTCCAGCGCGCGCATTACCGCCAGGGAATTTCCAGCTTTTCCAGCGCCTTTTCCAGCGCATGAAGATATAGGCCAGTAGGCTTCTCTCATCAATTCCAGCGCCTATGATGCTTGAGAACATATTCCTTCCAGCGCGCGTCAACGCTCACGAGGCTTGTTTTCCAGCGCCCAGTTCCAGCGCAAAACCTAAACCTATTATGATGCGTAGTAGAGCCTCGCGGGTTCCAGCGCTTATTCCAGCGTTCCAGCGCGTTCGACTTCTTCCAGCGCCCTTCGTGCCTGTCCATGAACTGGGTTAATTCCAGCGCTTAATTCCAGCGCAACTCTTTTGACGCTTCCAGCGCTTTCCAGCGCCAGCGCATCAAAGAAAGGTCTACGAACGCCTGATGGTCGCTAGACATGAGAAGGGAGATTCCGATTTTTCCGATACAAATGTAACGGTAACCGGAGGGCGCCTTGGGGGTCACCTGAGAACAACCCGCTCCCTGAGCCCACCGGCTCTTAATGGAAAGGTGCGAGGGCCGCAGTTTAGAGGGGATGCCCGAGAGCGCGGGTCGTGCGGGTCGTGCGGGTCGTGCGGGTCGTGCGGGTCGTGCGGGTCGTGCGGGTCGTGCGGGTCGTGCGGGTCGTGCGGGTCGTGCGGGTCGTGCGGGTCGTGCGGGTCGTGCGGGTCGTGCGGAGAAGAAAATCCGTGCGGAGAAAATCCGTCGAGAAAATAGAAAATCCCGTGCGGGTCGTGCGGGTCGTGCGAGAAAATCCGGTCGTGCGGGTCGTGCAGAAAATCCGGGTCGAGAAAATAGAAAATCCCGTGCGGAGAAAATCCGTCGTAGAAAATCCGCGGGTCGTGAGAAAATCCAAAATCCTGCGGGTCAGAAAATCCGTGCGGGTCGTTAGAAAATCCAAAATCCTTTCGTGGGTTTCGTGGGTTTCGTGGGTTTCGTAGAAAATAGAAAATCCGTGGGAGAAAAGAAAATCCTGGGTTTCGTGGGTTTCGAGAAAATCCGTGGAGAAAATCCTTTCGTGGGTTTCGTGGGTTTCGTGGGTTTCGTGGGAGAAAATCCTTTCGTGGGTTTCGTGGGTTTCGTGGGTTTCGTAGAAAATCCTGGGTTCGTGGGTTTCGTTAGAAAAGAAAATCCCGTGAGAAAATCCGGTTTCGTAGAAAATCCAATCCTCGTGAGAAAATCCGGTAGAAAATCCAGAAAAAGAAAATCCAGAAAATCCAGAAAATCC' asSequence clumpFindK: 9 length: 516 times: 19) asArray hasEqualElements: #('GTTGCGATC' 'GATGAATAG' 'AGTGGTTGC' 'GCGGGTCGT' 'CACGAGCTT' 'GCCGTATTC' 'CCTTTAAAA' 'AGAAAATCC' 'TTCCAGCGC')) ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testCodonTables [ self assert: (self sequence codonTables isKindOf: BioCodonTables class) ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testComplement [ | seq1 seq2 comp | @@ -248,7 +250,7 @@ BioSequenceTest >> testComplement [ ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testConcat [ | seq1 seq2 result | @@ -266,7 +268,7 @@ BioSequenceTest >> testConcat [ ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testContents [ sequence := BioSequence newAmbiguousDNA: 'ACAGTAGCTAGC'. @@ -275,7 +277,7 @@ BioSequenceTest >> testContents [ equals: 'ACAGTAGCTAGC' ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testCopyFrom [ | testSeq1 | @@ -287,7 +289,7 @@ BioSequenceTest >> testCopyFrom [ ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testCopyFromTo [ | testSeq1 | @@ -299,13 +301,13 @@ BioSequenceTest >> testCopyFromTo [ ] -{ #category : #test } +{ #category : 'test' } BioSequenceTest >> testDefaultAlphabetClass [ self assert: (self sequence defaultAlphabetClass isKindOf: BioAlphabet class) ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testDegenerateBasesAsMultibases [ self @@ -317,7 +319,7 @@ BioSequenceTest >> testDegenerateBasesAsMultibases [ equals: '' ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testDisambiguate [ | disambiguatedSeqs | @@ -341,7 +343,7 @@ BioSequenceTest >> testDisambiguate [ self assert: (disambiguatedSeqs bioHasEqualElements: {'ACGT'}). ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testEqual [ | testSeq1 | @@ -358,7 +360,7 @@ BioSequenceTest >> testEqual [ self deny: self sequence = testSeq1. ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testExpectedProbabilitySeqOfSizePatternLengthAlphabetSizeOccurrences [ " What is the expected number of occurrences of a 9-mer in 500 sequences, each of length 1000? @@ -366,7 +368,7 @@ BioSequenceTest >> testExpectedProbabilitySeqOfSizePatternLengthAlphabetSizeOccu self assert: (BioSequence expected: 500 probabilitySeqOfSize: 1000 patternLength: 9 alphabetSize: 4 occurrences: 1) equals: 1.89208984375 ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testGcContent [ self assert: 'gacgatcggtattcgtag' asSequence gcContent equals: 50.0. @@ -375,7 +377,7 @@ BioSequenceTest >> testGcContent [ ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testGcContentCalc [ self assert: 'gacgatcggtattcgtag' asSequence gcContent equals: 50.0. @@ -384,14 +386,14 @@ BioSequenceTest >> testGcContentCalc [ ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testGcSkewInt [ self assert: (('GAGCCACCGCGATA' asSequence gcSkewInt) hasEqualElements: #(0 1 1 2 1 0 0 -1 -2 -1 -2 -1 -1 -1 -1)). self assert: (('CATGGGCATCGGCCATACGCC' asSequence gcSkewInt) hasEqualElements: #(0 -1 -1 -1 0 1 2 1 1 1 0 1 2 1 0 0 0 0 -1 0 -1 -2)). ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testHasAmbiguousBases [ | seq1 seq2 seq3 | @@ -417,7 +419,7 @@ BioSequenceTest >> testHasAmbiguousBases [ self assert: seq2 hasAmbiguousBases. ] -{ #category : #test } +{ #category : 'test' } BioSequenceTest >> testHotspotRegionsLeftRight [ | seq1 hotspotRegions | @@ -430,7 +432,7 @@ BioSequenceTest >> testHotspotRegionsLeftRight [ ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testIsDNASequence [ | seq1 seq2 seq3 | @@ -449,14 +451,14 @@ BioSequenceTest >> testIsDNASequence [ ] -{ #category : #test } +{ #category : 'test' } BioSequenceTest >> testIsEmpty [ self deny: (BioSequence newAmbiguousDNA: self sampleDnaString03) isEmpty. self assert: (BioSequence newAmbiguousDNA: String empty) isEmpty. ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testIsProteinSequence [ | seq1 seq2 seq3 | @@ -475,7 +477,7 @@ BioSequenceTest >> testIsProteinSequence [ ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testIsRNASequence [ | seq1 seq2 seq3 | @@ -494,7 +496,7 @@ BioSequenceTest >> testIsRNASequence [ ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testJoinSequence [ | seq01 | @@ -507,7 +509,7 @@ BioSequenceTest >> testJoinSequence [ self assert: (BioSequence joinSequence: String empty) equals: String empty. ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testKmersCount [ self assert: ('GCGCG' asSequence kmersCount: 'GCG') equals: 2. @@ -519,7 +521,7 @@ BioSequenceTest >> testKmersCount [ self assert: ('CTGTTTTTGATCCATGATATGTTATCTCTCCGTCATCAGAAGAACAGTGACGGATCGCCCTCTCTCTTGGTCAGGCGACCGTTTGCCATAATGCCCATGCTTTCCAGCCAGCTCTCAAACTCCGGTGACTCGCGCAGGTTGAGTA' asSequence kmersCount: 'CTC') equals: 9. ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testKmersCountMismatches [ self assert: ('TTTAGAGCCTTCAGAGG' asSequence kmersCount: 'GAGG' mismatches: 2) equals: 4. @@ -529,7 +531,7 @@ BioSequenceTest >> testKmersCountMismatches [ ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testMinGCSkewInt [ self assert: ('ACCG' asSequence minGCSkewInt hasEqualElements: #(3)). @@ -538,7 +540,7 @@ BioSequenceTest >> testMinGCSkewInt [ self assert: ('CCGGCCGG' asSequence minGCSkewInt hasEqualElements: #(2 6)). ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testMostFrequentKmer [ self assert: ((('ACAACTATGCATCACTATCGGGAACTATCCT' asSequence mostFrequentKmer: 5) asArray collect: #asString) hasEqualElements: #('ACTAT')). @@ -546,7 +548,7 @@ BioSequenceTest >> testMostFrequentKmer [ ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testMostFrequentKmerMismatches [ self assert: @@ -585,7 +587,7 @@ BioSequenceTest >> testMostFrequentKmerMismatches [ asArray sorted hasEqualElements: #('GGTA')) ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testMostFrequentKmerRevCompMismatches [ self assert: @@ -622,7 +624,7 @@ BioSequenceTest >> testMostFrequentKmerRevCompMismatches [ asArray sorted hasEqualElements: #('CA' 'CC' 'GG' 'TG') sorted) ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testNewPrototype [ | prototype | @@ -636,7 +638,7 @@ BioSequenceTest >> testNewPrototype [ ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testOccurrencesOf [ sequence := BioSequence newAmbiguousDNA: 'CgGAtTTAGCgCGT'. @@ -654,7 +656,7 @@ BioSequenceTest >> testOccurrencesOf [ ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testOccurrencesOfLetters [ | occurrences | @@ -673,7 +675,7 @@ BioSequenceTest >> testOccurrencesOfLetters [ ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testPositionsOf [ | expected | @@ -694,7 +696,7 @@ BioSequenceTest >> testPositionsOf [ ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testRandomSeq [ | seq | @@ -709,7 +711,7 @@ BioSequenceTest >> testRandomSeq [ ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testReverseComplement [ | seq1 seq2 revComp | @@ -736,7 +738,7 @@ BioSequenceTest >> testReverseComplement [ ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testReversed [ | seqTest | @@ -757,13 +759,13 @@ BioSequenceTest >> testReversed [ self assert: seqTest reversed asString equals: String empty. ] -{ #category : #test } +{ #category : 'test' } BioSequenceTest >> testSequenceFeatures [ self assert: (self sequence sequenceFeatures isKindOf: Collection). ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testSize [ self assert: (self sequence size isKindOf: Integer). @@ -772,7 +774,7 @@ BioSequenceTest >> testSize [ ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testSizeExcludeTerminals [ self sequence: (BioSequence newWith: 'MAASEHRCVGCGFRVKSLF*' alphabet: BioIUPACProtein). @@ -784,7 +786,7 @@ BioSequenceTest >> testSizeExcludeTerminals [ self assert: self sequence sizeExcludeTerminals equals: 27. ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testSubSeqFromTo [ | subSeqString | @@ -801,7 +803,7 @@ BioSequenceTest >> testSubSeqFromTo [ self should: [ self sequence subSeqFrom: 0 to: 1 ] raise: Error. ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testTmStaluc [ "self assert: 'tgcagtacgtatcgt' tmStaluc equals: 42.21." @@ -810,7 +812,7 @@ BioSequenceTest >> testTmStaluc [ ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testTranscribe [ | testSeq1 transcribedSeq | @@ -826,7 +828,7 @@ BioSequenceTest >> testTranscribe [ self assert: transcribedSeq asString equals: self sampleSeq01Transcription. ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testTranscription [ | seqStrand seqTranscribed | @@ -841,7 +843,7 @@ BioSequenceTest >> testTranscription [ ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testTranslateFromDNA [ | seq1 seq2 seq3 seq4 translated1 translated2 | @@ -874,7 +876,7 @@ BioSequenceTest >> testTranslateFromDNA [ ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testTranslateFromRNA [ | seq3 seq4 | @@ -891,7 +893,7 @@ BioSequenceTest >> testTranslateFromRNA [ ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceTest >> testTranslated [ | seq1 seq2 seq3 seq4 translated1 translated2 | diff --git a/repository/BioTools-Tests/BioStringTest.class.st b/repository/BioTools-Tests/BioStringTest.class.st index dbe5d2df..2919fdfb 100644 --- a/repository/BioTools-Tests/BioStringTest.class.st +++ b/repository/BioTools-Tests/BioStringTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #BioStringTest, - #superclass : #BioAbstractTest, - #category : #'BioTools-Tests-Biological' + #name : 'BioStringTest', + #superclass : 'BioAbstractTest', + #category : 'BioTools-Tests-Biological', + #package : 'BioTools-Tests', + #tag : 'Biological' } -{ #category : #testing } +{ #category : 'testing' } BioStringTest >> testAddToAlignment [ | align1 | @@ -18,7 +20,7 @@ BioStringTest >> testAddToAlignment [ ] -{ #category : #testing } +{ #category : 'testing' } BioStringTest >> testAsAminoacidLetter [ self assert: 'A' asAminoacidLetter = $A. @@ -27,7 +29,7 @@ BioStringTest >> testAsAminoacidLetter [ self should: [ String empty asAminoacidLetter ] raise: BioException ] -{ #category : #testing } +{ #category : 'testing' } BioStringTest >> testAsLowercase [ self assert: (#('HOLA') asLowercase bioHasEqualElements: #('hola')). @@ -39,7 +41,7 @@ BioStringTest >> testAsLowercase [ ] -{ #category : #testing } +{ #category : 'testing' } BioStringTest >> testAsSequenceString [ self assert: ' ACTG ' asCondensedString = 'ACTG'. @@ -58,7 +60,7 @@ ACTG ] -{ #category : #testing } +{ #category : 'testing' } BioStringTest >> testCopyUpToStartParenthesis [ self assert: 'this is a (test)' copyUpToStartParenthesis = 'this is a'. @@ -68,7 +70,7 @@ BioStringTest >> testCopyUpToStartParenthesis [ ] -{ #category : #testing } +{ #category : 'testing' } BioStringTest >> testForAlphabet [ | seq1 seq2 seq3 | @@ -90,7 +92,7 @@ BioStringTest >> testForAlphabet [ ] -{ #category : #testing } +{ #category : 'testing' } BioStringTest >> testHasAmbiguousBases [ self assert: 'atgCtgAccR' hasAmbiguousDNABases. @@ -100,7 +102,7 @@ BioStringTest >> testHasAmbiguousBases [ self assert: 'AUGCAUCAGRYAUCUGU' hasAmbiguousRNABases. ] -{ #category : #testing } +{ #category : 'testing' } BioStringTest >> testIncludesBeginWith [ self assert: ('the quick brown fox jums over the lazy dog' includesBeginWith: 'the'). @@ -112,7 +114,7 @@ BioStringTest >> testIncludesBeginWith [ ] -{ #category : #testing } +{ #category : 'testing' } BioStringTest >> testIncludesBeginWithAnyOf [ self assert: ('the quick brown fox jums over the lazy dog' includesBeginWithAnyOf: #('the') ). @@ -125,7 +127,7 @@ BioStringTest >> testIncludesBeginWithAnyOf [ ] -{ #category : #testing } +{ #category : 'testing' } BioStringTest >> testIncludesLike [ | testString01 | @@ -140,7 +142,7 @@ BioStringTest >> testIncludesLike [ ] -{ #category : #testing } +{ #category : 'testing' } BioStringTest >> testIndicesOfAscii [ | ind1 ind2 | @@ -157,7 +159,7 @@ BioStringTest >> testIndicesOfAscii [ self assert: ('' indicesOfCharacter: $-) isEmpty. ] -{ #category : #testing } +{ #category : 'testing' } BioStringTest >> testIsAllLetters [ self assert: 'AATGATCGATGCTAGTCGACA' isAllLetters. @@ -168,7 +170,7 @@ BioStringTest >> testIsAllLetters [ ] -{ #category : #testing } +{ #category : 'testing' } BioStringTest >> testIsNumeric [ self assert: '123' isNumeric. @@ -183,7 +185,7 @@ BioStringTest >> testIsNumeric [ self deny: '5.23e-6e' isNumeric. ] -{ #category : #testing } +{ #category : 'testing' } BioStringTest >> testStringAsFloat [ self assert: '123' asFloat isFloat. diff --git a/repository/BioTools-Tests/BioUnknownSeqTest.class.st b/repository/BioTools-Tests/BioUnknownSeqTest.class.st index f2f3e0b9..9bcee89b 100644 --- a/repository/BioTools-Tests/BioUnknownSeqTest.class.st +++ b/repository/BioTools-Tests/BioUnknownSeqTest.class.st @@ -1,23 +1,25 @@ Class { - #name : #BioUnknownSeqTest, - #superclass : #BioAbstractSequenceTest, - #category : #'BioTools-Tests-Biological' + #name : 'BioUnknownSeqTest', + #superclass : 'BioAbstractSequenceTest', + #category : 'BioTools-Tests-Biological', + #package : 'BioTools-Tests', + #tag : 'Biological' } -{ #category : #accessing } +{ #category : 'accessing' } BioUnknownSeqTest >> alphabetClass [ ^ BioAlphabet ] -{ #category : #accessing } +{ #category : 'accessing' } BioUnknownSeqTest >> setUp [ super setUp. sequence := BioUnknownSeq new: 7 ] -{ #category : #testing } +{ #category : 'testing' } BioUnknownSeqTest >> testAlphabet [ self assert: ( self sequence alphabet isKindOf: BioAlphabet ). @@ -27,35 +29,35 @@ BioUnknownSeqTest >> testAlphabet [ self assert: self sequence unknownLetter = $? ] -{ #category : #testing } +{ #category : 'testing' } BioUnknownSeqTest >> testAsString [ self assert: self sequence asString equals: 'NNNNNNN'. ] -{ #category : #testing } +{ #category : 'testing' } BioUnknownSeqTest >> testComplementary [ self assert: self sequence complementary equals: 'NNNNNNN'. ] -{ #category : #testing } +{ #category : 'testing' } BioUnknownSeqTest >> testReversed [ self assert: self sequence reversed equals: 'NNNNNNN'. ] -{ #category : #testing } +{ #category : 'testing' } BioUnknownSeqTest >> testSameSequence [ self assert: self sequence sameSequence equals: 'NNNNNNN'. ] -{ #category : #testing } +{ #category : 'testing' } BioUnknownSeqTest >> testSize [ self assert: self sequence size equals: 7. @@ -63,7 +65,7 @@ BioUnknownSeqTest >> testSize [ ] -{ #category : #testing } +{ #category : 'testing' } BioUnknownSeqTest >> testUnknownLetter [ self assert: self sequence unknownLetter equals: $N. diff --git a/repository/BioTools-Tests/CharacterTest.extension.st b/repository/BioTools-Tests/CharacterTest.extension.st index d512d41e..5f789c3a 100644 --- a/repository/BioTools-Tests/CharacterTest.extension.st +++ b/repository/BioTools-Tests/CharacterTest.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #CharacterTest } +Extension { #name : 'CharacterTest' } -{ #category : #'*BioTools-Tests' } +{ #category : '*BioTools-Tests' } CharacterTest >> testAsAminoacidName [ self assert: $A asAminoacidName equals: 'Alanine'. @@ -47,7 +47,7 @@ CharacterTest >> testAsAminoacidName [ ] -{ #category : #'*BioTools-Tests' } +{ #category : '*BioTools-Tests' } CharacterTest >> testAsDisambiguatedDNAFormatted [ self assert: $a asDisambiguatedDNAFormatted equals: 'a'. diff --git a/repository/BioTools-Tests/StringTest.extension.st b/repository/BioTools-Tests/StringTest.extension.st index b6e891c5..b689b2c9 100644 --- a/repository/BioTools-Tests/StringTest.extension.st +++ b/repository/BioTools-Tests/StringTest.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #StringTest } +Extension { #name : 'StringTest' } -{ #category : #'*BioTools-Tests' } +{ #category : '*BioTools-Tests' } StringTest >> testAsAminoacidName [ self assert: 'A' asAminoacidName equals: 'Alanine'. diff --git a/repository/BioTools-Tests/package.st b/repository/BioTools-Tests/package.st index 5e68e11f..b8df8e9f 100644 --- a/repository/BioTools-Tests/package.st +++ b/repository/BioTools-Tests/package.st @@ -1 +1 @@ -Package { #name : #'BioTools-Tests' } +Package { #name : 'BioTools-Tests' } diff --git a/repository/BioTools/Association.extension.st b/repository/BioTools/Association.extension.st index 43d1976e..6ac8196b 100644 --- a/repository/BioTools/Association.extension.st +++ b/repository/BioTools/Association.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #Association } +Extension { #name : 'Association' } -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Association >> asSequence [ " Transform the receiver between 1 and 4**k (key) and k-mer of length k (value) into a using an array with k-mers as indices " @@ -9,7 +9,7 @@ Association >> asSequence [ yourself ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Association >> dumpToStream: aStream [ " Private - Write the receiver's contents into aStream " @@ -19,7 +19,7 @@ Association >> dumpToStream: aStream [ ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Association >> setMicrosatelliteGenotypeFor: aBioMicrosatellite [ aBioMicrosatellite diff --git a/repository/BioTools/Bag.extension.st b/repository/BioTools/Bag.extension.st index a0811ab2..005b4e77 100644 --- a/repository/BioTools/Bag.extension.st +++ b/repository/BioTools/Bag.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #Bag } +Extension { #name : 'Bag' } -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Bag >> maxElements [ " Answer a with the receiver's element(s) which contain the maximum occurrences " diff --git a/repository/BioTools/Behavior.extension.st b/repository/BioTools/Behavior.extension.st index 0880bda7..6653a9db 100644 --- a/repository/BioTools/Behavior.extension.st +++ b/repository/BioTools/Behavior.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #Behavior } +Extension { #name : 'Behavior' } -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Behavior >> allSuperclassesExcluding: aClass [ "Answer an OrderedCollection of the receiver's and the receiver's ancestor's superclasses up to aClass NOT included. The first element is the receiver's immediate diff --git a/repository/BioTools/BioAbstractAdapter.class.st b/repository/BioTools/BioAbstractAdapter.class.st index 4c2c748d..acdcfb55 100644 --- a/repository/BioTools/BioAbstractAdapter.class.st +++ b/repository/BioTools/BioAbstractAdapter.class.st @@ -22,25 +22,27 @@ Another example, to get the contents at an URL: ``` " Class { - #name : #BioAbstractAdapter, - #superclass : #BioObject, + #name : 'BioAbstractAdapter', + #superclass : 'BioObject', #instVars : [ 'provider' ], #classInstVars : [ 'isPreferred' ], - #category : #'BioTools-Adapters' + #category : 'BioTools-Adapters', + #package : 'BioTools', + #tag : 'Adapters' } -{ #category : #'accessing-adapters' } +{ #category : 'accessing-adapters' } BioAbstractAdapter class >> adapter [ " Answer an instance of the preferred subclass for providing the receiver's services " ^ self adapterClass new ] -{ #category : #'accessing-adapters' } +{ #category : 'accessing-adapters' } BioAbstractAdapter class >> adapterClass [ "Answer the preferred subclass for providing the receiver's services" @@ -49,7 +51,7 @@ BioAbstractAdapter class >> adapterClass [ ifNone: [ self validAdapters first ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioAbstractAdapter class >> bePreferred: aClass [ " Set aClass as preferred adapter to use " @@ -57,7 +59,7 @@ BioAbstractAdapter class >> bePreferred: aClass [ isPreferred := aClass ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioAbstractAdapter class >> defaultProviderClass [ " Private - Answer the of the preferred provider subclass " @@ -69,35 +71,35 @@ BioAbstractAdapter class >> defaultProviderClass [ ifFalse: [ self signalInvalidObject: 'No provider was found' ] ] -{ #category : #testing } +{ #category : 'testing' } BioAbstractAdapter class >> hasAnyProvider [ " Answer if the receiver is available in this system " ^ self allFinalClasses anySatisfy: [ : cls | cls providerIsAvailable ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioAbstractAdapter class >> isPreferred [ ^ isPreferred ] -{ #category : #testing } +{ #category : 'testing' } BioAbstractAdapter class >> isPreferredAdapter [ " Private - Answer if the receiver is the best option for the current image and platform " ^ false ] -{ #category : #accessing } +{ #category : 'accessing' } BioAbstractAdapter class >> providerClass [ " Answer a , the main external class name for this adapter " self subclassResponsibility ] -{ #category : #testing } +{ #category : 'testing' } BioAbstractAdapter class >> providerIsAvailable [ " Answer if the receiver is available in this system " @@ -105,7 +107,7 @@ BioAbstractAdapter class >> providerIsAvailable [ Smalltalk globals includesKey: self providerClass asSymbol ] ] -{ #category : #'accessing-adapters' } +{ #category : 'accessing-adapters' } BioAbstractAdapter class >> validAdapters [ " Answer a Collection with all the subclasses for which there is a provider installed in this system " @@ -113,24 +115,24 @@ BioAbstractAdapter class >> validAdapters [ ] -{ #category : #'initialize-release' } +{ #category : 'initialize-release' } BioAbstractAdapter >> initializeWith: aProvider [ " Private - Initialize the receiver with aProvider " self provider: aProvider ] -{ #category : #accessing } +{ #category : 'accessing' } BioAbstractAdapter >> provider [ ^ provider ] -{ #category : #accessing } +{ #category : 'accessing' } BioAbstractAdapter >> provider: anObject [ provider := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioAbstractAdapter >> providerClass [ " See class side comment " ^ self class providerClass diff --git a/repository/BioTools/BioAccession.class.st b/repository/BioTools/BioAccession.class.st index ce225a8e..39595627 100644 --- a/repository/BioTools/BioAccession.class.st +++ b/repository/BioTools/BioAccession.class.st @@ -5,15 +5,17 @@ Instance Variables: version Represents the biological version number of the accession " Class { - #name : #BioAccession, - #superclass : #BioNamedObject, + #name : 'BioAccession', + #superclass : 'BioNamedObject', #instVars : [ 'version' ], - #category : #'BioTools-Core' + #category : 'BioTools-Core', + #package : 'BioTools', + #tag : 'Core' } -{ #category : #converting } +{ #category : 'converting' } BioAccession >> asFastaRecord [ "Retrieve the sequence identified by the receiver and answer a with it" @@ -31,7 +33,7 @@ BioAccession >> asFastaRecord [ ^ eResponse result asFastaRecord ] -{ #category : #converting } +{ #category : 'converting' } BioAccession >> asString [ " Answer a that represents the receiver." @@ -43,27 +45,27 @@ BioAccession >> asString [ nextPutAll: self version asString ] ] ] -{ #category : #testing } +{ #category : 'testing' } BioAccession >> hasVersion [ " Answer if receiver is correctly versioned " ^ self isVersioned and: [ self version asString notEmpty ] ] -{ #category : #testing } +{ #category : 'testing' } BioAccession >> isEmpty [ " Answer whether the receiver contains a name. " ^ self hasName not ] -{ #category : #testing } +{ #category : 'testing' } BioAccession >> isNotEmpty [ ^ self isEmpty not. ] -{ #category : #testing } +{ #category : 'testing' } BioAccession >> isVersioned [ " Answer if the receiver has a version number " @@ -71,7 +73,7 @@ BioAccession >> isVersioned [ ^ version notNil ] -{ #category : #printing } +{ #category : 'printing' } BioAccession >> printOn: aStream [ " Private - See superimplementor´s comment " @@ -80,12 +82,12 @@ BioAccession >> printOn: aStream [ self version ifNotNil: [ :arg | aStream nextPutAll: self version ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioAccession >> version [ ^ version ] -{ #category : #accessing } +{ #category : 'accessing' } BioAccession >> version: anObject [ version := anObject ] diff --git a/repository/BioTools/BioAlignment.class.st b/repository/BioTools/BioAlignment.class.st index 5c8dcbc2..dcffbb6a 100644 --- a/repository/BioTools/BioAlignment.class.st +++ b/repository/BioTools/BioAlignment.class.st @@ -6,31 +6,33 @@ Represents a multiple alignment of sequences " Class { - #name : #BioAlignment, - #superclass : #BioNamedObject, + #name : 'BioAlignment', + #superclass : 'BioNamedObject', #instVars : [ 'set', 'consensusStrategy', 'isReference' ], - #category : #'BioTools-Core' + #category : 'BioTools-Core', + #package : 'BioTools', + #tag : 'Core' } -{ #category : #accessing } +{ #category : 'accessing' } BioAlignment >> addFastaRecord: fastaRecord [ " Add anObject to the alignment " ^ self addSequence: fastaRecord sequence named: fastaRecord sequenceName ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlignment >> addFromSequence: aBioSequence [ " Add aBioSequence to the receiver's alignments " set addLast: aBioSequence ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlignment >> addFromSequences: aSequenceCollection [ " Add aSequenceCollection to the receiver's alignments " @@ -38,70 +40,70 @@ BioAlignment >> addFromSequences: aSequenceCollection [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlignment >> addSequence: anObject [ " Add anObject to the alignment " ^ anObject addToAlignment: self ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlignment >> addSequence: anObject named: seqName [ " Add anObject to the alignment " ^ anObject addToAlignment: self named: seqName ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlignment >> addToFastaMultiRecord: aBSTFastaMultiRecord [ " Add the receiver's sequences to aBSTFastaMultiRecord " aBSTFastaMultiRecord sequences: self sequences ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlignment >> alignMaxSize [ "Answer the maximum length of sequences in the alignment " ^ (self sequences detectMax: #size) size ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlignment >> alignMinSize [ " Answer the minimum length of sequences in the alignment " ^ (self sequences detectMin: #size) size ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlignment >> anyOne [ " Answer a representative sample of the receiver " ^ set anyOne ] -{ #category : #converting } +{ #category : 'converting' } BioAlignment >> asFasta [ " Answer the receiver as a MultiFasta record object " ^ self asMultiFasta ] -{ #category : #converting } +{ #category : 'converting' } BioAlignment >> asMultiFasta [ " Answer the receiver as a MultiFasta record object " ^ BioFastaMultiRecord from: self sequences ] -{ #category : #converting } +{ #category : 'converting' } BioAlignment >> asMultiFastaString [ " Answer the receiver as a MultiFasta record object " ^ self asMultiFasta asString ] -{ #category : #converting } +{ #category : 'converting' } BioAlignment >> asString [ " Answer a String representation of the receiver " @@ -116,14 +118,14 @@ BioAlignment >> asString [ stream cr ] ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlignment >> at: anObject [ " Answer a Sequence or a Collection of Sequences at anObject " ^ anObject alignmentAt: self ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlignment >> atAccession: aBioAccession [ " Answer a identified by aBioAccession " @@ -132,7 +134,7 @@ BioAlignment >> atAccession: aBioAccession [ ifNone: [ self signalAlignmentNotFound: aBioAccession name ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlignment >> atAccession: accessionString ifPresent: aBlock [ | found | @@ -145,7 +147,7 @@ BioAlignment >> atAccession: accessionString ifPresent: aBlock [ ifNil: [ self signalAlignmentNotFound: accessionString ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlignment >> atAlignment: alignNumber [ " Answer a Collection with the receiver's sequences at alignNumber position " @@ -154,7 +156,7 @@ BioAlignment >> atAlignment: alignNumber [ ifFalse: [ self signalInvalidObject: alignNumber asString , ' is out of range in the receiver''s sequences' ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlignment >> atAlignments: anInterval [ " Answer a Collection with the receiver's sequences at alignNumber position " @@ -163,28 +165,28 @@ BioAlignment >> atAlignments: anInterval [ ifFalse: [ self signalInvalidObject: anInterval asString , ' is out of range in the receiver''s sequences' ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlignment >> atColumn: aColumnSpec [ " Answer a with the receiver's sequences at aColumnSpec position(s) " ^ BioSequence newWith: (aColumnSpec atColumnFromBioAlignment: self) ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlignment >> atColumns: aColumnRangeSpec [ " Answer a with the receiver's sequences at aColumnSpec position(s) " ^ aColumnRangeSpec atColumnFromBioAlignment: self ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlignment >> beReference [ " Set the receiver's to be a reference alignment " self isReference: true. ] -{ #category : #enumerating } +{ #category : 'enumerating' } BioAlignment >> collect: aBlock [ " Evaluate aBlock with each of the receiver's elements as the argument. Collect the resulting values into a collection like the receiver. Answer @@ -193,7 +195,7 @@ BioAlignment >> collect: aBlock [ ^ set collect: aBlock ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlignment >> consensus [ " Consensus sequence is the calculated order of most frequent residues, either nucleotide or amino acid, found at each position in a sequence alignment. Only DNA and RNA sequences are valid. Answer a representing the consensus sequence " @@ -205,7 +207,7 @@ BioAlignment >> consensus [ ^ consensusSeq ] -{ #category : #private } +{ #category : 'private' } BioAlignment >> consensusAt: anObject [ " See comment in bioConsensusFor: " @@ -213,14 +215,14 @@ BioAlignment >> consensusAt: anObject [ ] -{ #category : #private } +{ #category : 'private' } BioAlignment >> consensusStrategy [ ^ consensusStrategy ifNil: [ consensusStrategy := self defaultConsensusStrategy ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlignment >> copyFrom: startIndex to: stopIndex [ " Answer a String representation of the receiver " @@ -229,47 +231,47 @@ BioAlignment >> copyFrom: startIndex to: stopIndex [ ifFalse: [ self signalInvalidObject: 'First index should be minor or equal than stop index' ] ] -{ #category : #defaults } +{ #category : 'defaults' } BioAlignment >> defaultConsensusStrategy [ ^ BioDummyConsensusStrategy new ] -{ #category : #enumerating } +{ #category : 'enumerating' } BioAlignment >> do: aBlock [ " Evaluate aBlock with each of the receiver's set as the argument. " ^ set do: aBlock ] -{ #category : #enumerating } +{ #category : 'enumerating' } BioAlignment >> do: aBlockClosure displayingProgress: aString [ "Evaluate aBlock with each of the receiver's set as the argument." ^ set do: aBlockClosure displayingProgress: aString ] -{ #category : #enumerating } +{ #category : 'enumerating' } BioAlignment >> doWithIndex: aFullBlockClosure [ self sequences doWithIndex: aFullBlockClosure ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlignment >> first [ " Return a representing the first element in the receiver " ^ self at: 1 ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlignment >> head: aNumber [ " Answer the first aNumber of in the receiver " ^ self sequences first: aNumber ] -{ #category : #initialization } +{ #category : 'initialization' } BioAlignment >> initialize [ " Private - Initialize the receiver's contents " @@ -277,14 +279,14 @@ BioAlignment >> initialize [ set := OrderedCollection new ] -{ #category : #testing } +{ #category : 'testing' } BioAlignment >> isEmpty [ " Answer whether the receiver contains any elements. " ^ set isEmpty ] -{ #category : #testing } +{ #category : 'testing' } BioAlignment >> isReference [ " Answer a if the receiver represents a reference alignment, an usually well-annotated set of sequences " @@ -292,21 +294,21 @@ BioAlignment >> isReference [ ifNil: [ isReference := false ] ] -{ #category : #testing } +{ #category : 'testing' } BioAlignment >> isReference: aBoolean [ " Set aBoolean to if the receiver represents a reference alignment, an usually well-annotated set of sequences " isReference := aBoolean ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlignment >> last [ "Return the last element in the receiver" ^ self at: self size ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlignment >> longestConsecutive: aCharacter [ " Answer the sequence in the receiver with the longest substring containing only letter for each element of aCharacter. @@ -317,14 +319,14 @@ BioAlignment >> longestConsecutive: aCharacter [ self sequences max: [ : seq | seq longestConsecutive: aCharacter ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlignment >> maxSequenceLength [ "Answer a representing the sequence of maximum length in the receiver." ^ self sequences max: #size ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlignment >> numberOfBases [ " Answer a with the receiver's sequence size (considering all having the same size) " @@ -332,7 +334,7 @@ BioAlignment >> numberOfBases [ ] -{ #category : #printing } +{ #category : 'printing' } BioAlignment >> printOn: aStream [ " Private - See superimplementor's comment " @@ -347,21 +349,21 @@ BioAlignment >> printOn: aStream [ nextPutAll: seq asString ] ] -{ #category : #filtering } +{ #category : 'filtering' } BioAlignment >> rejectTaxa: taxaNameOrCollectionOfTaxons [ "Answer a of removing the sequences annotated with taxaName " ^ taxaNameOrCollectionOfTaxons rejectFromBioAlignment: self ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlignment >> select: aBlock [ "Refer to the comment in Collection|select:." set := self sequences select: aBlock. ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlignment >> sequenceNames [ " Answer a Collection of receiver's alignments names. If any or all of the receiver's sequences are unnamed, then assign a numeric identifier corresponding to the position in the receiver's alignment set " @@ -376,21 +378,21 @@ BioAlignment >> sequenceNames [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlignment >> sequenceStrings [ " Answer a of receiver's alignments String's " ^ set collect: #asString ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlignment >> sequences [ " Answer a Collection of the receiver's sequences " ^ set ] -{ #category : #private } +{ #category : 'private' } BioAlignment >> signalAlignmentNotFound: accessionString [ " Private - Signal an exception " @@ -400,7 +402,7 @@ BioAlignment >> signalAlignmentNotFound: accessionString [ nextPutAll: accessionString ]) ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlignment >> size [ "Answer how many sequences the receiver contains." diff --git a/repository/BioTools/BioAlphabet.class.st b/repository/BioTools/BioAlphabet.class.st index 5607c925..eb449c83 100644 --- a/repository/BioTools/BioAlphabet.class.st +++ b/repository/BioTools/BioAlphabet.class.st @@ -3,36 +3,38 @@ Represents a generic alphabet, used by default instantiations. An alphabet can c " Class { - #name : #BioAlphabet, - #superclass : #BioObject, + #name : 'BioAlphabet', + #superclass : 'BioObject', #instVars : [ 'unknownElement' ], - #category : #'BioTools-Alphabets' + #category : 'BioTools-Alphabets', + #package : 'BioTools', + #tag : 'Alphabets' } -{ #category : #accessing } +{ #category : 'accessing' } BioAlphabet class >> allCodes [ " Answer a Collection with all biologically relevant letters " ^ (self allFinalClasses collect: #codes) joinUsing: String empty ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlphabet class >> ambiguityCodes [ " Answer a String containing common used letters in sequences with no meaning for the receiver " ^ '-.?XxNn' ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlphabet class >> codes [ " Answer a Collection with all biologically relevant letters " ^ self subclassResponsibility ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlphabet class >> colorMap [ " Answer a with mappings of each receiver's letter to an instance of " @@ -43,7 +45,7 @@ BioAlphabet class >> colorMap [ collect: [ : colorSym : letter | letter -> (Color perform: colorSym) ]) asDictionary. ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlphabet class >> colorSet [ " See comment in #colorSet: " @@ -53,7 +55,7 @@ BioAlphabet class >> colorSet [ Color perform: colorSym ]. ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlphabet class >> colorSet: colorSetSym [ " Answer a with elements to be applied to each of the receiver's letters. The code relies on the #defaultColiors set of methods implemented in Color class. These methods answer a with color names as symbols representing a Color implemented in class side. The Collection currently returns the color name every 5 elements, remaining elements are RGB values. " @@ -63,14 +65,14 @@ BioAlphabet class >> colorSet: colorSetSym [ Color perform: colorSym ]. ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioAlphabet class >> for: aString [ " Answer a new instance of the receiver using the sequence aString " ^ self basicNew ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlphabet class >> guessAlphabetFrom: aString [ " Answer a class with the guessed alphabet from analyzing aString " @@ -99,7 +101,7 @@ BioAlphabet class >> guessAlphabetFrom: aString [ ] -{ #category : #private } +{ #category : 'private' } BioAlphabet class >> guessAlphabetThreshold [ " Answer a consensus Float for determining the alphabet type. This value currently follows BioPerl convention, guess DNA if % of ATGC is > this value. @@ -108,14 +110,14 @@ BioAlphabet class >> guessAlphabetThreshold [ ^ 0.85 ] -{ #category : #testing } +{ #category : 'testing' } BioAlphabet class >> hasAmbiguousBases: aString [ " Answer if receiver contains ambiguity codes " ^ aString asUppercase anySatisfy: [ : letter | self ambiguityCodes includes: letter ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlphabet class >> lowercaseAndUppercaseCodes [ "Answer a with the receiver's codes in both uppercase and lowercase versions" @@ -125,7 +127,7 @@ BioAlphabet class >> lowercaseAndUppercaseCodes [ << self uppercaseCodes ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlphabet class >> lowercaseAndUppercaseCodesWithGap [ "Answer a with the receiver's codes in both uppercase and lowercase versions" @@ -135,104 +137,104 @@ BioAlphabet class >> lowercaseAndUppercaseCodesWithGap [ << '-?' ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlphabet class >> lowercaseCodes [ " See superimplementor's comment " ^ self codes asLowercase ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlphabet class >> uppercaseCodes [ ^ self codes ] -{ #category : #comparing } +{ #category : 'comparing' } BioAlphabet >> = anObject [ "Answer whether the receiver and anObject represent the same object." ^ self class = anObject class ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlphabet >> allCodes [ " Answer a with the receiver's allowed letters " ^ self class allCodes ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlphabet >> ambiguityCodes [ " Answer a with the ambiguity codes for the receiver's alphabet " ^ self class ambiguityCodes ] -{ #category : #testing } +{ #category : 'testing' } BioAlphabet >> canTranslate [ " Answer if the receiver can be translated into proteins (amino acid sequences) " ^ false ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlphabet >> codes [ " Answer a with the receiver's allowed letters " ^ self class codes ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlphabet >> defaultUnknownElement [ " Private - Answer a used as representative of unknown elements in the receiver " ^ $N ] -{ #category : #testing } +{ #category : 'testing' } BioAlphabet >> hasAmbiguousBases: aString [ " Answer if receiver contains ambiguity codes " ^ self class hasAmbiguousBases: aString ] -{ #category : #testing } +{ #category : 'testing' } BioAlphabet >> isDNA [ " Answer if the receiver describes a DNA alphabet " ^ false ] -{ #category : #testing } +{ #category : 'testing' } BioAlphabet >> isProtein [ " Answer if the receiver describes a Protein alphabet " ^ false ] -{ #category : #testing } +{ #category : 'testing' } BioAlphabet >> isRNA [ " Answer if the receiver describes a RNA alphabet " ^ false ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlphabet >> size [ " Answer the number of letters in the receiver " ^ self codes size ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlphabet >> sortedCodes [ " Answer a with the receiver's allowed letters sorted lexicographically " ^ self codes asSortedCollection joinUsing: '' ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlphabet >> unknownLetter [ " Answer a representative when a letter in the receiver is unknown " @@ -240,7 +242,7 @@ BioAlphabet >> unknownLetter [ ifNil: [ unknownElement := self defaultUnknownElement ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioAlphabet >> unknownLetter: aCharacter [ " Set aCharacter as representative when a letter in the receiver is unknown " diff --git a/repository/BioTools/BioBasicReader.class.st b/repository/BioTools/BioBasicReader.class.st index 47625b64..cb8216c4 100644 --- a/repository/BioTools/BioBasicReader.class.st +++ b/repository/BioTools/BioBasicReader.class.st @@ -1,5 +1,7 @@ Class { - #name : #BioBasicReader, - #superclass : #BioReader, - #category : 'BioTools-IO' + #name : 'BioBasicReader', + #superclass : 'BioReader', + #category : 'BioTools-IO', + #package : 'BioTools', + #tag : 'IO' } diff --git a/repository/BioTools/BioChromosome.class.st b/repository/BioTools/BioChromosome.class.st index 3a97aad9..54865aeb 100644 --- a/repository/BioTools/BioChromosome.class.st +++ b/repository/BioTools/BioChromosome.class.st @@ -20,34 +20,36 @@ Internal Representation and Key Implementation Points. Implementation Points " Class { - #name : #BioChromosome, - #superclass : #BioNamedObject, + #name : 'BioChromosome', + #superclass : 'BioNamedObject', #instVars : [ 'fragments', 'genome', 'genes' ], - #category : #'BioTools-Biological' + #category : 'BioTools-Biological', + #package : 'BioTools', + #tag : 'Biological' } -{ #category : #accessing } +{ #category : 'accessing' } BioChromosome >> addGene: aBioGene [ "Add aBioGene as gene in the receiver's genes" self genes add: aBioGene ] -{ #category : #accessing } +{ #category : 'accessing' } BioChromosome >> fragments [ ^ fragments ] -{ #category : #accessing } +{ #category : 'accessing' } BioChromosome >> fragments: anObject [ fragments := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioChromosome >> genes [ " Answer a of " @@ -55,24 +57,24 @@ BioChromosome >> genes [ ifNil: [ genes := OrderedCollection new ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioChromosome >> genes: anObject [ genes := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioChromosome >> genome [ " Answer the receiver's genome " ^ genome ] -{ #category : #accessing } +{ #category : 'accessing' } BioChromosome >> genome: anObject [ genome := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioChromosome >> removeGene: aBioGene [ " Remove aBioGene as gene in the receiver's genes " diff --git a/repository/BioTools/BioChromosomeFragment.class.st b/repository/BioTools/BioChromosomeFragment.class.st index ec290c67..2337a443 100644 --- a/repository/BioTools/BioChromosomeFragment.class.st +++ b/repository/BioTools/BioChromosomeFragment.class.st @@ -18,16 +18,18 @@ Internal Representation and Key Implementation Points. Implementation Points " Class { - #name : #BioChromosomeFragment, - #superclass : #BioNamedObject, + #name : 'BioChromosomeFragment', + #superclass : 'BioNamedObject', #instVars : [ 'start', 'end' ], - #category : #'BioTools-Biological' + #category : 'BioTools-Biological', + #package : 'BioTools', + #tag : 'Biological' } -{ #category : #comparing } +{ #category : 'comparing' } BioChromosomeFragment >> = aBioChromosomeFragment [ "Answer if the receiver is equal to aBioChromosomeFragment" @@ -40,17 +42,17 @@ BioChromosomeFragment >> = aBioChromosomeFragment [ ^ true ] -{ #category : #accessing } +{ #category : 'accessing' } BioChromosomeFragment >> end [ ^ end ] -{ #category : #accessing } +{ #category : 'accessing' } BioChromosomeFragment >> end: anObject [ end := anObject ] -{ #category : #comparing } +{ #category : 'comparing' } BioChromosomeFragment >> hash [ " Private - hash is implemented because #= is implemented " @@ -58,12 +60,12 @@ BioChromosomeFragment >> hash [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioChromosomeFragment >> start [ ^ start ] -{ #category : #accessing } +{ #category : 'accessing' } BioChromosomeFragment >> start: anObject [ start := anObject ] diff --git a/repository/BioTools/BioCodonTable.class.st b/repository/BioTools/BioCodonTable.class.st index e59404ce..c956c51d 100644 --- a/repository/BioTools/BioCodonTable.class.st +++ b/repository/BioTools/BioCodonTable.class.st @@ -17,24 +17,26 @@ table " Class { - #name : #BioCodonTable, - #superclass : #BioNamedObject, + #name : 'BioCodonTable', + #superclass : 'BioNamedObject', #instVars : [ 'table', 'startCodons', 'stopCodons' ], - #category : #'BioTools-Biological' + #category : 'BioTools-Biological', + #package : 'BioTools', + #tag : 'Biological' } -{ #category : #comparing } +{ #category : 'comparing' } BioCodonTable >> <= aCodonTable [ "Answer whether the receiver is less than the argument." ^ self alphaName <= aCodonTable alphaName ] -{ #category : #comparing } +{ #category : 'comparing' } BioCodonTable >> = codonTable [ " Answer if receiver contains the same codon table as codonTable and start/stop codons " @@ -42,7 +44,7 @@ BioCodonTable >> = codonTable [ and: [ self stopCodons = codonTable stopCodons ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioCodonTable >> at: aCodonString [ " Answer the amino acid associated with aCodonString or, if isn't found, answer the result of evaluating aBlock. " @@ -51,7 +53,7 @@ BioCodonTable >> at: aCodonString [ ifAbsent: [ self signalNotFound: 'Amino acid not found for ' , aCodonString asString ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioCodonTable >> at: aCodonString ifAbsent: aBlock [ " Answer the amino acid associated with aCodonString or, if isn't found, answer the result of evaluating aBlock. " @@ -59,28 +61,28 @@ BioCodonTable >> at: aCodonString ifAbsent: aBlock [ ^ self table at: aCodonString ifAbsent: aBlock ] -{ #category : #comparing } +{ #category : 'comparing' } BioCodonTable >> hash [ " Private - hash is implemented because #= is implemented " ^ self table hash bitXor: (self startCodons hash bitXor: self stopCodons hash) ] -{ #category : #testing } +{ #category : 'testing' } BioCodonTable >> isStartCodon: aCodon [ " Answer if aCodon is a start codon in the receiver " ^ self startCodons includes: aCodon asUppercase ] -{ #category : #testing } +{ #category : 'testing' } BioCodonTable >> isStopCodon: aCodon [ " Answer if aCodon is a stop codon in the receiver " ^ self stopCodons includes: aCodon asUppercase ] -{ #category : #accessing } +{ #category : 'accessing' } BioCodonTable >> keyAtValue: aCodonString ifAbsent: aBlock [ " Answer the amino acid associated with aCodonString or, if isn't found, answer the result of evaluating aBlock. " @@ -90,14 +92,14 @@ BioCodonTable >> keyAtValue: aCodonString ifAbsent: aBlock [ ifAbsent: aBlock ] -{ #category : #accessing } +{ #category : 'accessing' } BioCodonTable >> keysAndValuesDo: aBlock [ "Enumerate the receiver with all the keys and values passed to the block" ^ self table keysAndValuesDo: aBlock ] -{ #category : #printing } +{ #category : 'printing' } BioCodonTable >> printOn: aStream [ " Private - See superimplementor's comment " @@ -110,37 +112,37 @@ BioCodonTable >> printOn: aStream [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioCodonTable >> startCodons [ ^ startCodons ] -{ #category : #accessing } +{ #category : 'accessing' } BioCodonTable >> startCodons: anObject [ startCodons := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioCodonTable >> stopCodons [ ^ stopCodons ] -{ #category : #accessing } +{ #category : 'accessing' } BioCodonTable >> stopCodons: anObject [ stopCodons := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioCodonTable >> table [ ^ table ] -{ #category : #accessing } +{ #category : 'accessing' } BioCodonTable >> table: anObject [ table := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioCodonTable >> tableId [ " Answer a Number with the receiver's table number " diff --git a/repository/BioTools/BioCodonTables.class.st b/repository/BioTools/BioCodonTables.class.st index 534e823e..3d27519a 100644 --- a/repository/BioTools/BioCodonTables.class.st +++ b/repository/BioTools/BioCodonTables.class.st @@ -7,18 +7,20 @@ http://www.ncbi.nlm.nih.gov/Taxonomy/Utils/wprintgc.cgi " Class { - #name : #BioCodonTables, - #superclass : #BioObject, + #name : 'BioCodonTables', + #superclass : 'BioObject', #classVars : [ 'CurrentCodonTable' ], #classInstVars : [ 'codonTables' ], - #category : #'BioTools-Biological' + #category : 'BioTools-Biological', + #package : 'BioTools', + #tag : 'Biological' } -{ #category : #accessing } +{ #category : 'accessing' } BioCodonTables class >> atCodonTable: anInteger [ " Select and answer a Codon Table by number anInteger " @@ -33,7 +35,7 @@ BioCodonTables class >> atCodonTable: anInteger [ ^ cTable ] -{ #category : #accessing } +{ #category : 'accessing' } BioCodonTables class >> codonTables [ " Answer a of codon tables " @@ -43,45 +45,45 @@ BioCodonTables class >> codonTables [ codonTables ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioCodonTables class >> codonTables: anObject [ codonTables := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioCodonTables class >> currentCodonTable [ ^ CurrentCodonTable ifNil: [ CurrentCodonTable := self defaultCodonTable ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioCodonTables class >> currentCodonTable: anObject [ CurrentCodonTable := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioCodonTables class >> defaultCodonTable [ " Answer the default codon table for translations " ^ BioDNACodonTables atCodonTable: 1 ] -{ #category : #enumerating } +{ #category : 'enumerating' } BioCodonTables class >> do: aBlock [ " Iterate and evaluate aBlock with each codon of the receiver's elements as the argument." self codonTables do: [ : each | aBlock value: each ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioCodonTables class >> isStopCodon: aCodon [ " Answer if aCodon is a stop codon in the receiver " ^ self currentCodonTable isStopCodon: aCodon ] -{ #category : #accessing } +{ #category : 'accessing' } BioCodonTables class >> missingCodonTable: anInteger [ " Private - Throw an exception for missing codon table numbered anInteger " @@ -95,7 +97,7 @@ BioCodonTables class >> missingCodonTable: anInteger [ self signalNotFound: exceptionString ] -{ #category : #'initialize-release' } +{ #category : 'initialize-release' } BioCodonTables class >> newCodonTable: tableClass selectors: tableSelectors [ " Private - Create a new codon table with the information in tableSelectors " | codonTable tableIdSelector tableNames table tableStartCodons tableStopCodons | @@ -115,7 +117,7 @@ BioCodonTables class >> newCodonTable: tableClass selectors: tableSelectors [ ^ codonTable ] -{ #category : #printing } +{ #category : 'printing' } BioCodonTables class >> printOn: aStream [ " Private - See superimplementor's comment " @@ -124,14 +126,14 @@ BioCodonTables class >> printOn: aStream [ ifTrue: [ aStream nextPutAll: self codonTables size asString ] ] -{ #category : #'initialize-release' } +{ #category : 'initialize-release' } BioCodonTables class >> release [ self codonTables: nil. CurrentCodonTable := nil ] -{ #category : #accessing } +{ #category : 'accessing' } BioCodonTables class >> reverseTranslate: aString [ " Answer a codon String by aString amino acid " @@ -146,41 +148,41 @@ BioCodonTables class >> reverseTranslate: aString [ ^ translations ] -{ #category : #enumerating } +{ #category : 'enumerating' } BioCodonTables class >> tableAllNames [ " Answer a Collection of codon table identifiers " ^ self codonTables collect: #names ] -{ #category : #private } +{ #category : 'private' } BioCodonTables class >> tableClass [ " Answer the Collection class used to store the codon tables " ^ Dictionary ] -{ #category : #enumerating } +{ #category : 'enumerating' } BioCodonTables class >> tableIdentifiers [ " Answer a Collection of codon table identifiers " ^ self codonTables collect: #name ] -{ #category : #enumerating } +{ #category : 'enumerating' } BioCodonTables class >> tableNames [ " Answer a Collection of codon table identifiers " ^ self codonTables collect: #alphaName ] -{ #category : #private } +{ #category : 'private' } BioCodonTables class >> tableSelectors [ ^ self class selectorsInProtocol: #tables ] -{ #category : #accessing } +{ #category : 'accessing' } BioCodonTables class >> translate: aCodonString [ " Answer a translated amino acid by aCodonString " diff --git a/repository/BioTools/BioCommandObject.class.st b/repository/BioTools/BioCommandObject.class.st index c8d158a1..865ef46c 100644 --- a/repository/BioTools/BioCommandObject.class.st +++ b/repository/BioTools/BioCommandObject.class.st @@ -9,32 +9,34 @@ Provides general methods for external command execution Implementation Points " Class { - #name : #BioCommandObject, - #superclass : #BioPropertyObject, + #name : 'BioCommandObject', + #superclass : 'BioPropertyObject', #instVars : [ 'client' ], - #category : #'BioTools-Core' + #category : 'BioTools-Core', + #package : 'BioTools', + #tag : 'Core' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioCommandObject class >> on: aBioObject [ " Answer a new instance of the receiver setting aBioObject as its client " ^ self basicNew initializeOn: aBioObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioCommandObject >> client [ ^ client ] -{ #category : #accessing } +{ #category : 'accessing' } BioCommandObject >> client: anObject [ client := anObject ] -{ #category : #'initialize-release' } +{ #category : 'initialize-release' } BioCommandObject >> initializeOn: aBioClientObject [ " Private - Set the receiver's client to aBioClientObject " diff --git a/repository/BioTools/BioComplementaryAlphabet.class.st b/repository/BioTools/BioComplementaryAlphabet.class.st index 32849a14..2d29679e 100644 --- a/repository/BioTools/BioComplementaryAlphabet.class.st +++ b/repository/BioTools/BioComplementaryAlphabet.class.st @@ -3,22 +3,24 @@ Alphabet where each element has a complementary case. Abstract class. " Class { - #name : #BioComplementaryAlphabet, - #superclass : #BioAlphabet, + #name : 'BioComplementaryAlphabet', + #superclass : 'BioAlphabet', #classInstVars : [ 'complementaryTable' ], - #category : #'BioTools-Alphabets' + #category : 'BioTools-Alphabets', + #package : 'BioTools', + #tag : 'Alphabets' } -{ #category : #accessing } +{ #category : 'accessing' } BioComplementaryAlphabet class >> complementaryCases [ ^ Array empty ] -{ #category : #accessing } +{ #category : 'accessing' } BioComplementaryAlphabet class >> complementaryTable [ ^ complementaryTable @@ -27,13 +29,13 @@ BioComplementaryAlphabet class >> complementaryTable [ self complementaryTable ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioComplementaryAlphabet class >> complementaryTable: aCollection [ complementaryTable := aCollection ] -{ #category : #'class initialization' } +{ #category : 'class initialization' } BioComplementaryAlphabet class >> complementaryTableClass [ " Answer a to store the complementary cases for the receiver " @@ -41,7 +43,7 @@ BioComplementaryAlphabet class >> complementaryTableClass [ ] -{ #category : #'class initialization' } +{ #category : 'class initialization' } BioComplementaryAlphabet class >> initialize [ " self initailize " @@ -50,14 +52,14 @@ BioComplementaryAlphabet class >> initialize [ ] -{ #category : #testing } +{ #category : 'testing' } BioComplementaryAlphabet >> canTranslate [ " Answer if the receiver can be translated into proteins (amino acid sequences) " ^ true ] -{ #category : #'accessing private' } +{ #category : 'accessing private' } BioComplementaryAlphabet >> complementaryTable [ " Answer a with the receiver's complementary table " diff --git a/repository/BioTools/BioConnectionSettings.class.st b/repository/BioTools/BioConnectionSettings.class.st index f9f0c1f6..ea5b91d3 100644 --- a/repository/BioTools/BioConnectionSettings.class.st +++ b/repository/BioTools/BioConnectionSettings.class.st @@ -13,8 +13,8 @@ Instance Variables: useHTTPProxy " Class { - #name : #BioConnectionSettings, - #superclass : #BioObject, + #name : 'BioConnectionSettings', + #superclass : 'BioObject', #instVars : [ 'serverAddress', 'serverDirectory', @@ -29,129 +29,131 @@ Class { 'proxyUser', 'useProxy' ], - #category : #'BioTools-Core' + #category : 'BioTools-Core', + #package : 'BioTools', + #tag : 'Core' } -{ #category : #accessing } +{ #category : 'accessing' } BioConnectionSettings >> email [ ^ email ifNil: [ email := 'invalid@invalid.com' ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioConnectionSettings >> email: anObject [ email := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioConnectionSettings >> lastProxyPort [ ^ lastProxyPort ] -{ #category : #accessing } +{ #category : 'accessing' } BioConnectionSettings >> lastProxyPort: anObject [ lastProxyPort := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioConnectionSettings >> lastProxyServer [ ^ lastProxyServer ] -{ #category : #accessing } +{ #category : 'accessing' } BioConnectionSettings >> lastProxyServer: anObject [ lastProxyServer := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioConnectionSettings >> password [ ^ password ] -{ #category : #accessing } +{ #category : 'accessing' } BioConnectionSettings >> password: anObject [ password := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioConnectionSettings >> proxyPassword [ ^ proxyPassword ] -{ #category : #accessing } +{ #category : 'accessing' } BioConnectionSettings >> proxyPassword: anObject [ proxyPassword := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioConnectionSettings >> proxyUser [ ^ proxyUser ] -{ #category : #accessing } +{ #category : 'accessing' } BioConnectionSettings >> proxyUser: anObject [ proxyUser := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioConnectionSettings >> serverAddress [ ^ serverAddress ] -{ #category : #accessing } +{ #category : 'accessing' } BioConnectionSettings >> serverAddress: anObject [ serverAddress := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioConnectionSettings >> serverDirectory [ ^ serverDirectory ] -{ #category : #accessing } +{ #category : 'accessing' } BioConnectionSettings >> serverDirectory: aString [ " Set aString with the receiver's server directory to CWD " serverDirectory := aString ] -{ #category : #accessing } +{ #category : 'accessing' } BioConnectionSettings >> serverPort [ ^ serverPort ] -{ #category : #accessing } +{ #category : 'accessing' } BioConnectionSettings >> serverPort: anObject [ serverPort := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioConnectionSettings >> useNetworkAuthentication [ ^ useNetworkAuthentification ] -{ #category : #accessing } +{ #category : 'accessing' } BioConnectionSettings >> useNetworkAuthentication: anObject [ useNetworkAuthentification := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioConnectionSettings >> useProxy [ ^ useProxy ] -{ #category : #accessing } +{ #category : 'accessing' } BioConnectionSettings >> useProxy: anObject [ useProxy := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioConnectionSettings >> user [ ^ user ] -{ #category : #accessing } +{ #category : 'accessing' } BioConnectionSettings >> user: anObject [ user := anObject ] diff --git a/repository/BioTools/BioConsensusStrategy.class.st b/repository/BioTools/BioConsensusStrategy.class.st index 2d384592..77e8ba22 100644 --- a/repository/BioTools/BioConsensusStrategy.class.st +++ b/repository/BioTools/BioConsensusStrategy.class.st @@ -8,7 +8,9 @@ Several considerations for calculation of consensus sequence are: - Consider any character when making consensus " Class { - #name : #BioConsensusStrategy, - #superclass : #BioObject, - #category : #'BioTools-Helpers' + #name : 'BioConsensusStrategy', + #superclass : 'BioObject', + #category : 'BioTools-Helpers', + #package : 'BioTools', + #tag : 'Helpers' } diff --git a/repository/BioTools/BioDBObject.class.st b/repository/BioTools/BioDBObject.class.st index 43f821cf..af990741 100644 --- a/repository/BioTools/BioDBObject.class.st +++ b/repository/BioTools/BioDBObject.class.st @@ -10,8 +10,8 @@ Instance Variables " Class { - #name : #BioDBObject, - #superclass : #BioPropertyObject, + #name : 'BioDBObject', + #superclass : 'BioPropertyObject', #traits : 'BioFTPDownloader', #classTraits : 'BioFTPDownloader classTrait', #instVars : [ @@ -20,10 +20,12 @@ Class { 'checkMD5', 'connectionSettings' ], - #category : #'BioTools-Core' + #category : 'BioTools-Core', + #package : 'BioTools', + #tag : 'Core' } -{ #category : #accessing } +{ #category : 'accessing' } BioDBObject class >> databaseList [ " self databaseList " @@ -32,7 +34,7 @@ BioDBObject class >> databaseList [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioDBObject class >> descriptionAt: aString [ " Answer a with the receiver's description for aString identifier " @@ -46,59 +48,59 @@ BioDBObject class >> descriptionAt: aString [ ifNil: [ self nullName ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioDBObject class >> nullName [ " Answer a String representing a default name " ^ 'Database not found' ] -{ #category : #accessing } +{ #category : 'accessing' } BioDBObject >> checkMD5 [ ^ checkMD5 ] -{ #category : #accessing } +{ #category : 'accessing' } BioDBObject >> checkMD5: anObject [ checkMD5 := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioDBObject >> client [ ^ client ] -{ #category : #accessing } +{ #category : 'accessing' } BioDBObject >> client: anObject [ client := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioDBObject >> connectionSettings [ ^ connectionSettings ifNil: [ connectionSettings := BioConnectionSettings new ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioDBObject >> connectionSettings: anObject [ connectionSettings := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioDBObject >> dbName [ " Answer a String with the receiver's database name " ^ self class dbName ] -{ #category : #accessing } +{ #category : 'accessing' } BioDBObject >> forceDownload [ ^ forceDownload ] -{ #category : #'initialize-release' } +{ #category : 'initialize-release' } BioDBObject >> serverDirectory [ " Answer a String with the receiver's server directory to CWD " @@ -106,7 +108,7 @@ BioDBObject >> serverDirectory [ ] -{ #category : #'initialize-release' } +{ #category : 'initialize-release' } BioDBObject >> serverName [ " Answer a String with the receiver's server name " @@ -114,7 +116,7 @@ BioDBObject >> serverName [ ] -{ #category : #'initialize-release' } +{ #category : 'initialize-release' } BioDBObject >> serverPassword [ " Answer a String with the password to connect " @@ -122,7 +124,7 @@ BioDBObject >> serverPassword [ ] -{ #category : #'initialize-release' } +{ #category : 'initialize-release' } BioDBObject >> serverUser [ " Answer a String with the user name to connect " @@ -130,28 +132,28 @@ BioDBObject >> serverUser [ ] -{ #category : #downloading } +{ #category : 'downloading' } BioDBObject >> setForceDownload [ " Force download even if there is a archive already on local directory. " forceDownload := true ] -{ #category : #actions } +{ #category : 'actions' } BioDBObject >> summary [ " Answer the result of the command applied on the receiver " ^ self client summary ] -{ #category : #actions } +{ #category : 'actions' } BioDBObject >> summaryAlternative [ " Answer the result of the command applied on the receiver " ^ self client summaryAlternative ] -{ #category : #'convenience-filesystem' } +{ #category : 'convenience-filesystem' } BioDBObject >> workingDirectory [ " Answer a String representing a directory name where the BLAST databases will be stored " diff --git a/repository/BioTools/BioDFSNode.class.st b/repository/BioTools/BioDFSNode.class.st index 6750eaab..c49d3a2a 100644 --- a/repository/BioTools/BioDFSNode.class.st +++ b/repository/BioTools/BioDFSNode.class.st @@ -7,18 +7,20 @@ https://github.com/laserson/pytools/blob/master/degex.py " Class { - #name : #BioDFSNode, - #superclass : #BioObject, + #name : 'BioDFSNode', + #superclass : 'BioObject', #instVars : [ 'visited', 'neighbors', 'cumulSeq', 'remainSeq' ], - #category : #'BioTools-Helpers' + #category : 'BioTools-Helpers', + #package : 'BioTools', + #tag : 'Helpers' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioDFSNode class >> newWith: aString remaining: aCollection [ ^ self new @@ -26,23 +28,23 @@ BioDFSNode class >> newWith: aString remaining: aCollection [ yourself ] -{ #category : #accessing } +{ #category : 'accessing' } BioDFSNode >> beVisited [ visited := true ] -{ #category : #accessing } +{ #category : 'accessing' } BioDFSNode >> cumulSeq [ ^ cumulSeq ] -{ #category : #accessing } +{ #category : 'accessing' } BioDFSNode >> cumulSeq: anObject [ cumulSeq := anObject ] -{ #category : #initialize } +{ #category : 'initialize' } BioDFSNode >> initializeCumulative: cum remaining: rem [ visited := false. @@ -51,39 +53,39 @@ BioDFSNode >> initializeCumulative: cum remaining: rem [ remainSeq := rem ] -{ #category : #accessing } +{ #category : 'accessing' } BioDFSNode >> isVisited [ ^ visited ] -{ #category : #accessing } +{ #category : 'accessing' } BioDFSNode >> neighbors [ ^ neighbors ] -{ #category : #accessing } +{ #category : 'accessing' } BioDFSNode >> neighbors: anObject [ neighbors := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioDFSNode >> remainSeq [ ^ remainSeq ] -{ #category : #accessing } +{ #category : 'accessing' } BioDFSNode >> remainSeq: anObject [ remainSeq := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioDFSNode >> remainingSeqAt: index [ ^ self remainSeq at: index ] -{ #category : #accessing } +{ #category : 'accessing' } BioDFSNode >> remainingSeqSize [ ^ self remainSeq size diff --git a/repository/BioTools/BioDNAAlphabet.class.st b/repository/BioTools/BioDNAAlphabet.class.st index 158acb71..6d086365 100644 --- a/repository/BioTools/BioDNAAlphabet.class.st +++ b/repository/BioTools/BioDNAAlphabet.class.st @@ -3,26 +3,28 @@ Nucleotide alphabet only including A,C,G,T without additional codes such as (N)o " Class { - #name : #BioDNAAlphabet, - #superclass : #BioComplementaryAlphabet, - #category : #'BioTools-Alphabets' + #name : 'BioDNAAlphabet', + #superclass : 'BioComplementaryAlphabet', + #category : 'BioTools-Alphabets', + #package : 'BioTools', + #tag : 'Alphabets' } -{ #category : #accessing } +{ #category : 'accessing' } BioDNAAlphabet class >> ambiguityCodes [ " See superimplementor's comment " ^ String empty ] -{ #category : #accessing } +{ #category : 'accessing' } BioDNAAlphabet class >> codes [ " See superimplementor's comment " ^ 'ACGT' ] -{ #category : #accessing } +{ #category : 'accessing' } BioDNAAlphabet class >> complementaryCases [ " Private - Uppercase and lowercase versions are included to preserve the case, which avoids case conversion and could be useful to distinguish sequence regions " @@ -30,14 +32,14 @@ BioDNAAlphabet class >> complementaryCases [ ^ #($A $T $T $A $C $G $G $C $a $t $t $a $c $g $g $c) ] -{ #category : #testing } +{ #category : 'testing' } BioDNAAlphabet >> isDNA [ " Private - See superimplementor's comment " ^ true ] -{ #category : #printing } +{ #category : 'printing' } BioDNAAlphabet >> printOn: aStream [ " See superimplementor's comment " diff --git a/repository/BioTools/BioDNACodonTables.class.st b/repository/BioTools/BioDNACodonTables.class.st index 7cff9627..0e0bad97 100644 --- a/repository/BioTools/BioDNACodonTables.class.st +++ b/repository/BioTools/BioDNACodonTables.class.st @@ -5,18 +5,20 @@ Class Instance Variables: codonTables " Class { - #name : #BioDNACodonTables, - #superclass : #BioCodonTables, - #category : #'BioTools-Biological' + #name : 'BioDNACodonTables', + #superclass : 'BioCodonTables', + #category : 'BioTools-Biological', + #package : 'BioTools', + #tag : 'Biological' } -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> alternativeFlatwormMitochondrialId [ ^ 9 ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> alternativeFlatwormMitochondrialTable [ @@ -36,7 +38,7 @@ add: 'TTT'-> 'F'; add: 'TTC'-> 'F'; add: 'TTA'-> 'L'; add: 'TTG'-> 'L'; add: 'TC 'GGC'-> 'G'; add: 'GGA'-> 'G'; add: 'GGG'-> 'G'; yourself ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> alternativeFlatwormMitochondrialTableNames [ ^ OrderedCollection @@ -45,19 +47,19 @@ BioDNACodonTables class >> alternativeFlatwormMitochondrialTableNames [ with: 'SGC8' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> alternativeFlatwormMitochondrialTableStartCodons [ ^ OrderedCollection with: 'ATG' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> alternativeFlatwormMitochondrialTableStopCodons [ ^ OrderedCollection with: 'TAG' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> alternativeYeastNuclearTable [ @@ -77,20 +79,20 @@ add: 'TTT'-> 'F'; add: 'TTC'-> 'F'; add: 'TTA'-> 'L'; add: 'TTG'-> 'L'; add: 'TC 'GGG'-> 'G'; yourself ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> alternativeYeastNuclearTableId [ ^ 12 ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> alternativeYeastNuclearTableNames [ ^ OrderedCollection with: 'Alternative Yeast Nuclear' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> alternativeYeastNuclearTableStartCodons [ ^ OrderedCollection @@ -98,7 +100,7 @@ BioDNACodonTables class >> alternativeYeastNuclearTableStartCodons [ with: 'ATG' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> alternativeYeastNuclearTableStopCodons [ ^ OrderedCollection @@ -107,7 +109,7 @@ BioDNACodonTables class >> alternativeYeastNuclearTableStopCodons [ with: 'TGA' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> ascidianMitochondrialTable [ @@ -127,20 +129,20 @@ add: 'TTT'-> 'F'; add: 'TTC'-> 'F'; add: 'TTA'-> 'L'; add: 'TTG'-> 'L'; add: 'TC 'GGA'-> 'G'; add: 'GGG'-> 'G'; yourself ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> ascidianMitochondrialTableId [ ^ 13 ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> ascidianMitochondrialTableNames [ ^ OrderedCollection with: 'Ascidian Mitochondrial' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> ascidianMitochondrialTableStartCodons [ ^ OrderedCollection @@ -150,7 +152,7 @@ BioDNACodonTables class >> ascidianMitochondrialTableStartCodons [ with: 'GTG' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> ascidianMitochondrialTableStopCodons [ ^ OrderedCollection @@ -158,7 +160,7 @@ BioDNACodonTables class >> ascidianMitochondrialTableStopCodons [ with: 'TAG' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> bacterialTable [ @@ -178,20 +180,20 @@ add: 'TTT'-> 'F'; add: 'TTC'-> 'F'; add: 'TTA'-> 'L'; add: 'TTG'-> 'L'; add: 'TC 'GGG'-> 'G'; yourself ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> bacterialTableId [ ^ 11 ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> bacterialTableNames [ ^ OrderedCollection with: 'Bacterial and Plant Plastid' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> bacterialTableStartCodons [ ^ OrderedCollection new @@ -199,7 +201,7 @@ BioDNACodonTables class >> bacterialTableStartCodons [ yourself ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> bacterialTableStopCodons [ ^ OrderedCollection @@ -208,7 +210,7 @@ BioDNACodonTables class >> bacterialTableStopCodons [ with: 'TGA' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> blepharismaMacronuclearTable [ @@ -229,14 +231,14 @@ add: 'TTT'-> 'F'; add: 'TTC'-> 'F'; add: 'TTA'-> 'L'; add: 'TTG'-> 'L'; add: 'TC 'GGA'-> 'G'; add: 'GGG'-> 'G'; yourself ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> blepharismaMacronuclearTableId [ ^ 15 ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> blepharismaMacronuclearTableNames [ @@ -244,7 +246,7 @@ BioDNACodonTables class >> blepharismaMacronuclearTableNames [ with: 'Blepharisma Macronuclear' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> blepharismaMacronuclearTableStartCodons [ @@ -252,7 +254,7 @@ BioDNACodonTables class >> blepharismaMacronuclearTableStartCodons [ with: 'ATG' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> blepharismaMacronuclearTableStopCodons [ @@ -261,7 +263,7 @@ BioDNACodonTables class >> blepharismaMacronuclearTableStopCodons [ with: 'TGA' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> chlorophyceanMitochondrialTable [ @@ -282,14 +284,14 @@ add: 'TTT'-> 'F'; add: 'TTC'-> 'F'; add: 'TTA'-> 'L'; add: 'TTG'-> 'L'; add: 'TC 'GGA'-> 'G'; add: 'GGG'-> 'G'; yourself ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> chlorophyceanMitochondrialTableId [ ^ 16 ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> chlorophyceanMitochondrialTableNames [ @@ -297,7 +299,7 @@ BioDNACodonTables class >> chlorophyceanMitochondrialTableNames [ with: 'Chlorophycean Mitochondrial' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> chlorophyceanMitochondrialTableStartCodons [ @@ -305,7 +307,7 @@ BioDNACodonTables class >> chlorophyceanMitochondrialTableStartCodons [ with: 'ATG' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> chlorophyceanMitochondrialTableStopCodons [ @@ -314,7 +316,7 @@ BioDNACodonTables class >> chlorophyceanMitochondrialTableStopCodons [ with: 'TGA' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> ciliateNuclearTable [ @@ -334,13 +336,13 @@ add: 'TTT'-> 'F'; add: 'TTC'-> 'F'; add: 'TTA'-> 'L'; add: 'TTG'-> 'L'; add: 'TC 'GGC'-> 'G'; add: 'GGA'-> 'G'; add: 'GGG'-> 'G'; yourself ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> ciliateNuclearTableId [ ^ 6 ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> ciliateNuclearTableNames [ ^ OrderedCollection @@ -351,21 +353,21 @@ BioDNACodonTables class >> ciliateNuclearTableNames [ ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> ciliateNuclearTableStartCodons [ ^ OrderedCollection with: 'ATG' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> ciliateNuclearTableStopCodons [ ^ OrderedCollection with: 'TGA' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> echinodermMitochondrialTable [ @@ -385,13 +387,13 @@ add: 'TTT'-> 'F'; add: 'TTC'-> 'F'; add: 'TTA'-> 'L'; add: 'TTG'-> 'L'; add: 'TC 'GGA'-> 'G'; add: 'GGG'-> 'G'; yourself ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> echinodermMitochondrialTableId [ ^ 9 ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> echinodermMitochondrialTableNames [ ^ OrderedCollection @@ -400,7 +402,7 @@ BioDNACodonTables class >> echinodermMitochondrialTableNames [ with: 'SGC8' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> echinodermMitochondrialTableStartCodons [ ^ OrderedCollection @@ -408,7 +410,7 @@ BioDNACodonTables class >> echinodermMitochondrialTableStartCodons [ with: 'ATG' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> echinodermMitochondrialTableStopCodons [ ^ OrderedCollection @@ -416,7 +418,7 @@ BioDNACodonTables class >> echinodermMitochondrialTableStopCodons [ with: 'TAG' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> euplotidNuclearTable [ @@ -436,13 +438,13 @@ add: 'TTT'-> 'F'; add: 'TTC'-> 'F'; add: 'TTA'-> 'L'; add: 'TTG'-> 'L'; add: 'TC 'GGA'-> 'G'; add: 'GGG'-> 'G'; yourself ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> euplotidNuclearTableId [ ^ 10 ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> euplotidNuclearTableNames [ ^ OrderedCollection @@ -450,14 +452,14 @@ BioDNACodonTables class >> euplotidNuclearTableNames [ with: 'SGC9' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> euplotidNuclearTableStartCodons [ ^ OrderedCollection with: 'ATG' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> euplotidNuclearTableStopCodons [ ^ OrderedCollection @@ -465,7 +467,7 @@ BioDNACodonTables class >> euplotidNuclearTableStopCodons [ with: 'TAG' ] -{ #category : #'initialize-release' } +{ #category : 'initialize-release' } BioDNACodonTables class >> initialize [ " Private - Initialize receiver's codon tables " | tablesCount tableSelectors startIndex | @@ -480,7 +482,7 @@ BioDNACodonTables class >> initialize [ startIndex := startIndex + 5 ] ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> invertebrateMitocondrialTable [ @@ -501,14 +503,14 @@ add: 'TTT'-> 'F'; add: 'TTC'-> 'F'; add: 'TTA'-> 'L'; add: 'TTG'-> 'L'; add: 'TC 'GGA'-> 'G'; add: 'GGG'-> 'G'; yourself. ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> invertebrateMitocondrialTableId [ ^ 5 ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> invertebrateMitocondrialTableNames [ @@ -517,7 +519,7 @@ BioDNACodonTables class >> invertebrateMitocondrialTableNames [ with: 'SGC4' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> invertebrateMitocondrialTableStartCodons [ @@ -530,7 +532,7 @@ BioDNACodonTables class >> invertebrateMitocondrialTableStartCodons [ with: 'GTG' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> invertebrateMitocondrialTableStopCodons [ @@ -539,7 +541,7 @@ BioDNACodonTables class >> invertebrateMitocondrialTableStopCodons [ with: 'TAG' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> protozoanMitocondrialTable [ @@ -548,14 +550,14 @@ BioDNACodonTables class >> protozoanMitocondrialTable [ add: 'TTT'-> 'F'; add: 'TTC'-> 'F'; add: 'TTA'-> 'L'; add: 'TTG'-> 'L'; add: 'TCT'-> 'S'; add: 'TCC'-> 'S'; add: 'TCA'-> 'S'; add: 'TCG'-> 'S'; add: 'TAT'-> 'Y'; add: 'TAC'-> 'Y'; add: 'TGT'-> 'C'; add: 'TGC'-> 'C'; add: 'TGA'-> 'W'; add: 'TGG'-> 'W'; add: 'CTT'-> 'L'; add: 'CTC'-> 'L'; add: 'CTA'-> 'L'; add: 'CTG'-> 'L'; add: 'CCT'-> 'P'; add: 'CCC'-> 'P'; add: 'CCA'-> 'P'; add: 'CCG'-> 'P'; add: 'CAT'-> 'H'; add: 'CAC'-> 'H'; add: 'CAA'-> 'Q'; add: 'CAG'-> 'Q'; add: 'CGT'-> 'R'; add: 'CGC'-> 'R'; add: 'CGA'-> 'R'; add: 'CGG'-> 'R'; add: 'ATT'-> 'I'; add: 'ATC'-> 'I'; add: 'ATA'-> 'I'; add: 'ATG'-> 'M'; add: 'ACT'-> 'T'; add: 'ACC'-> 'T'; add: 'ACA'-> 'T'; add: 'ACG'-> 'T'; add: 'AAT'-> 'N'; add: 'AAC'-> 'N'; add: 'AAA'-> 'K'; add: 'AAG'-> 'K'; add: 'AGT'-> 'S'; add: 'AGC'-> 'S'; add: 'AGA'-> 'R'; add: 'AGG'-> 'R'; add: 'GTT'-> 'V'; add: 'GTC'-> 'V'; add: 'GTA'-> 'V'; add: 'GTG'-> 'V'; add: 'GCT'-> 'A'; add: 'GCC'-> 'A'; add: 'GCA'-> 'A'; add: 'GCG'-> 'A'; add: 'GAT'-> 'D'; add: 'GAC'-> 'D'; add: 'GAA'-> 'E'; add: 'GAG'-> 'E'; add: 'GGT'-> 'G'; add: 'GGC'-> 'G'; add: 'GGA'-> 'G'; add: 'GGG'-> 'G'; yourself ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> protozoanMitocondrialTableId [ ^ 4 ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> protozoanMitocondrialTableNames [ @@ -568,7 +570,7 @@ BioDNACodonTables class >> protozoanMitocondrialTableNames [ with: 'SGC3' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> protozoanMitocondrialTableStartCodons [ @@ -577,7 +579,7 @@ BioDNACodonTables class >> protozoanMitocondrialTableStartCodons [ yourself ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> protozoanMitocondrialTableStopCodons [ @@ -586,7 +588,7 @@ BioDNACodonTables class >> protozoanMitocondrialTableStopCodons [ with: 'TAG' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> scenedesmusObliquusMitochondrialTable [ @@ -606,27 +608,27 @@ add: 'TTT'-> 'F'; add: 'TTC'-> 'F'; add: 'TTA'-> 'L'; add: 'TTG'-> 'L'; add: 'TC 'GGG'-> 'G'; yourself ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> scenedesmusObliquusMitochondrialTableId [ ^ 22 ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> scenedesmusObliquusMitochondrialTableNames [ ^ OrderedCollection with: 'Scenedesmus obliquus Mitochondrial' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> scenedesmusObliquusMitochondrialTableStartCodons [ ^ OrderedCollection with: 'ATG' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> scenedesmusObliquusMitochondrialTableStopCodons [ ^ OrderedCollection @@ -635,7 +637,7 @@ BioDNACodonTables class >> scenedesmusObliquusMitochondrialTableStopCodons [ with: 'TAG' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> standardTable [ " Answer the NCBI standard codon table for DNA" @@ -704,14 +706,14 @@ BioDNACodonTables class >> standardTable [ yourself ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> standardTableId [ " Answer the NCBI standard codon table ID for DNA" ^ 1 ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> standardTableNames [ " Answer the NCBI standard codon table for DNA" @@ -720,7 +722,7 @@ BioDNACodonTables class >> standardTableNames [ with: 'SGC0' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> standardTableStartCodons [ " Answer the NCBI standard codon table start codons for DNA" @@ -730,7 +732,7 @@ BioDNACodonTables class >> standardTableStartCodons [ with: 'ATG' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> standardTableStopCodons [ " Answer the NCBI standard codon table stop codons for DNA" @@ -740,7 +742,7 @@ BioDNACodonTables class >> standardTableStopCodons [ with: 'TGA' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> thraustochytriumMitochondrialTable [ @@ -760,14 +762,14 @@ add: 'TTT'-> 'F'; add: 'TTC'-> 'F'; add: 'TTG'-> 'L'; add: 'TCT'-> 'S'; add: 'TC 'GAG'-> 'E'; add: 'GGT'-> 'G'; add: 'GGC'-> 'G'; add: 'GGA'-> 'G'; add: 'GGG'-> 'G'; yourself ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> thraustochytriumMitochondrialTableId [ ^ 23 ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> thraustochytriumMitochondrialTableNames [ @@ -775,7 +777,7 @@ BioDNACodonTables class >> thraustochytriumMitochondrialTableNames [ with: 'Thraustochytrium Mitochondrial' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> thraustochytriumMitochondrialTableStartCodons [ @@ -785,7 +787,7 @@ BioDNACodonTables class >> thraustochytriumMitochondrialTableStartCodons [ with: 'GTG' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> thraustochytriumMitochondrialTableStopCodons [ @@ -796,7 +798,7 @@ BioDNACodonTables class >> thraustochytriumMitochondrialTableStopCodons [ with: 'TGA' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> trematodeMitochondrialTable [ @@ -816,20 +818,20 @@ add: 'TTT'-> 'F'; add: 'TTC'-> 'F'; add: 'TTA'-> 'L'; add: 'TTG'-> 'L'; add: 'TC 'GGA'-> 'G'; add: 'GGG'-> 'G'; yourself ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> trematodeMitochondrialTableId [ ^ 21 ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> trematodeMitochondrialTableNames [ ^ OrderedCollection with: 'Trematode Mitochondrial' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> trematodeMitochondrialTableStartCodons [ ^ OrderedCollection @@ -837,7 +839,7 @@ BioDNACodonTables class >> trematodeMitochondrialTableStartCodons [ with: 'ATG' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> trematodeMitochondrialTableStopCodons [ ^ OrderedCollection @@ -845,7 +847,7 @@ BioDNACodonTables class >> trematodeMitochondrialTableStopCodons [ with: 'TAG' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> vertebrateMitocondrialTable [ " Answer the NCBI vertebrate mitochondrial codon table for DNA" @@ -915,7 +917,7 @@ BioDNACodonTables class >> vertebrateMitocondrialTable [ yourself. ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> vertebrateMitocondrialTableId [ " Answer the NCBI VM table ID " @@ -923,7 +925,7 @@ BioDNACodonTables class >> vertebrateMitocondrialTableId [ ^ 2 ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> vertebrateMitocondrialTableNames [ " Answer the NCBI VM codon table names for DNA" @@ -933,7 +935,7 @@ BioDNACodonTables class >> vertebrateMitocondrialTableNames [ with: 'SGC1' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> vertebrateMitocondrialTableStartCodons [ " Answer the NCBI VM codon table start codons for DNA" @@ -946,7 +948,7 @@ BioDNACodonTables class >> vertebrateMitocondrialTableStartCodons [ with: 'GTG' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> vertebrateMitocondrialTableStopCodons [ " Answer the NCBI VM codon table stop codons for DNA" @@ -958,7 +960,7 @@ BioDNACodonTables class >> vertebrateMitocondrialTableStopCodons [ with: 'AGG' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> yeastMitocondrialTable [ " Answer the NCBI yeast mitochondrial codon table for DNA" @@ -969,7 +971,7 @@ add: 'TTT'-> 'F'; add: 'TTC'-> 'F'; add: 'TTA'-> 'L'; add: 'TTG'-> 'L'; add: 'TC yourself. ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> yeastMitocondrialTableId [ " Answer the NCBI yeast table ID " @@ -977,7 +979,7 @@ BioDNACodonTables class >> yeastMitocondrialTableId [ ^ 3 ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> yeastMitocondrialTableNames [ " Answer the NCBI standard codon table for DNA" @@ -987,7 +989,7 @@ BioDNACodonTables class >> yeastMitocondrialTableNames [ with: 'SGC2' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> yeastMitocondrialTableStartCodons [ " Answer the NCBI yeast codon table start codons for DNA" @@ -997,7 +999,7 @@ BioDNACodonTables class >> yeastMitocondrialTableStartCodons [ with: 'ATG' ] -{ #category : #tables } +{ #category : 'tables' } BioDNACodonTables class >> yeastMitocondrialTableStopCodons [ " Answer the NCBI VM codon table stop codons for DNA" diff --git a/repository/BioTools/BioDNANucleotide.class.st b/repository/BioTools/BioDNANucleotide.class.st index 4c223ef4..8e2214b7 100644 --- a/repository/BioTools/BioDNANucleotide.class.st +++ b/repository/BioTools/BioDNANucleotide.class.st @@ -6,15 +6,17 @@ letter: " Class { - #name : #BioDNANucleotide, - #superclass : #BioObject, + #name : 'BioDNANucleotide', + #superclass : 'BioObject', #instVars : [ 'letter' ], - #category : #'BioTools-Biological' + #category : 'BioTools-Biological', + #package : 'BioTools', + #tag : 'Biological' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioDNANucleotide class >> with: aCharacter [ ^ self basicNew @@ -22,12 +24,12 @@ BioDNANucleotide class >> with: aCharacter [ yourself ] -{ #category : #accessing } +{ #category : 'accessing' } BioDNANucleotide >> letter [ ^ letter ] -{ #category : #accessing } +{ #category : 'accessing' } BioDNANucleotide >> letter: anObject [ letter := anObject ] diff --git a/repository/BioTools/BioDownloader.trait.st b/repository/BioTools/BioDownloader.trait.st index f9e8ec50..e9f1a376 100644 --- a/repository/BioTools/BioDownloader.trait.st +++ b/repository/BioTools/BioDownloader.trait.st @@ -14,11 +14,13 @@ Client must implement " Trait { - #name : #BioDownloader, - #category : #'BioTools-Helpers' + #name : 'BioDownloader', + #category : 'BioTools-Helpers', + #package : 'BioTools', + #tag : 'Helpers' } -{ #category : #downloading } +{ #category : 'downloading' } BioDownloader >> connect [ " Private - Connect the receiver's to download databases " @@ -30,7 +32,7 @@ BioDownloader >> connect [ ] -{ #category : #defaults } +{ #category : 'defaults' } BioDownloader >> defaultPassword [ " Answer a with the password to connect " @@ -38,7 +40,7 @@ BioDownloader >> defaultPassword [ ] -{ #category : #defaults } +{ #category : 'defaults' } BioDownloader >> defaultUser [ " Answer a String with the user name to connect " @@ -46,7 +48,7 @@ BioDownloader >> defaultUser [ ] -{ #category : #downloading } +{ #category : 'downloading' } BioDownloader >> download [ " Download the requested files only if they are missing or if they are newer in the remote site. " @@ -55,7 +57,7 @@ BioDownloader >> download [ ] -{ #category : #downloading } +{ #category : 'downloading' } BioDownloader >> download: fileName [ " Download fileName from the remote site. " @@ -69,28 +71,28 @@ BioDownloader >> download: fileName [ ] -{ #category : #downloading } +{ #category : 'downloading' } BioDownloader >> downloadUrl [ " Answer a with the URL to fetch to the server " ^ self url downloadUrl ] -{ #category : #downloading } +{ #category : 'downloading' } BioDownloader >> fetch [ " Answer the result of the command applied on the receiver " ^ self client fetch ] -{ #category : #downloading } +{ #category : 'downloading' } BioDownloader >> info [ " Answer the result of the command applied on the receiver " ^ self client info ] -{ #category : #downloading } +{ #category : 'downloading' } BioDownloader >> isUpdated: fileName [ " Answer if modification time of remote fileName is newer than modification time of receiver's copy of fileName " @@ -105,7 +107,7 @@ BioDownloader >> isUpdated: fileName [ and: [ (self openFileNamed: fileName) directoryEntry modificationTime < (self client getMdtm: fileName) ] ] -{ #category : #downloading } +{ #category : 'downloading' } BioDownloader >> prvDownload: fileName [ " Private - Download fileName in the receiver's repository " @@ -119,7 +121,7 @@ BioDownloader >> prvDownload: fileName [ ] -{ #category : #downloading } +{ #category : 'downloading' } BioDownloader >> prvDownloadFileNamed: fileName binary: boolean [ " Private - Download fileName in the receiver's repository " @@ -137,21 +139,21 @@ BioDownloader >> prvDownloadFileNamed: fileName binary: boolean [ ^ stream ] -{ #category : #downloading } +{ #category : 'downloading' } BioDownloader >> search [ " Answer the result of the command applied on the receiver " ^ self client search ] -{ #category : #downloading } +{ #category : 'downloading' } BioDownloader >> url [ " Answer a Http Url with the receiver's configured URL " ^ self client url ] -{ #category : #downloading } +{ #category : 'downloading' } BioDownloader >> verifyMD5checksum: fileName [ " Answer if receiver's checksum file exists and remote digest is the same as the receiver's downloaded fileName digest (is not corrupted) " diff --git a/repository/BioTools/BioDummyConsensusStrategy.class.st b/repository/BioTools/BioDummyConsensusStrategy.class.st index 4194357d..b7b39ee6 100644 --- a/repository/BioTools/BioDummyConsensusStrategy.class.st +++ b/repository/BioTools/BioDummyConsensusStrategy.class.st @@ -1,10 +1,12 @@ Class { - #name : #BioDummyConsensusStrategy, - #superclass : #BioConsensusStrategy, - #category : 'BioTools-Helpers' + #name : 'BioDummyConsensusStrategy', + #superclass : 'BioConsensusStrategy', + #category : 'BioTools-Helpers', + #package : 'BioTools', + #tag : 'Helpers' } -{ #category : #accessing } +{ #category : 'accessing' } BioDummyConsensusStrategy >> consensusAt: aString [ ^ 'ACGTUN-' detectMax: [ : letter | aString instancesOf: letter ] diff --git a/repository/BioTools/BioDuplicatedObject.class.st b/repository/BioTools/BioDuplicatedObject.class.st index 5d858fc1..aae38df4 100644 --- a/repository/BioTools/BioDuplicatedObject.class.st +++ b/repository/BioTools/BioDuplicatedObject.class.st @@ -4,12 +4,14 @@ BioDuplicateObject should not be used directly. The exception should be raised f self signalDuplicateObject: 'message' , ex messageText. " Class { - #name : #BioDuplicatedObject, - #superclass : #BioException, - #category : #'BioTools-Exceptions' + #name : 'BioDuplicatedObject', + #superclass : 'BioException', + #category : 'BioTools-Exceptions', + #package : 'BioTools', + #tag : 'Exceptions' } -{ #category : #accessing } +{ #category : 'accessing' } BioDuplicatedObject >> messageText [ ^ String streamContents: [ :stream | diff --git a/repository/BioTools/BioEmptyResultObject.class.st b/repository/BioTools/BioEmptyResultObject.class.st index 6c7bcd37..3c8dcabe 100644 --- a/repository/BioTools/BioEmptyResultObject.class.st +++ b/repository/BioTools/BioEmptyResultObject.class.st @@ -2,43 +2,45 @@ Serves as a Null Object for empty or missing results. " Class { - #name : #BioEmptyResultObject, - #superclass : #BioResultObject, - #category : 'BioTools-Query' + #name : 'BioEmptyResultObject', + #superclass : 'BioResultObject', + #category : 'BioTools-Query', + #package : 'BioTools', + #tag : 'Query' } -{ #category : #accessing } +{ #category : 'accessing' } BioEmptyResultObject >> collect: aBlock [ ^ Array empty ] -{ #category : #accessing } +{ #category : 'accessing' } BioEmptyResultObject >> detectMax: aBlock [ ^ nil ] -{ #category : #testing } +{ #category : 'testing' } BioEmptyResultObject >> isEmpty [ "Answer whether the receiver contains any elements." ^ true ] -{ #category : #testing } +{ #category : 'testing' } BioEmptyResultObject >> notEmpty [ ^ false ] -{ #category : #accessing } +{ #category : 'accessing' } BioEmptyResultObject >> result [ ^ self ] -{ #category : #accessing } +{ #category : 'accessing' } BioEmptyResultObject >> size [ "Answer how many elements the receiver contains." diff --git a/repository/BioTools/BioEntrezXmlReader.class.st b/repository/BioTools/BioEntrezXmlReader.class.st index f299b535..cd2f8cd5 100644 --- a/repository/BioTools/BioEntrezXmlReader.class.st +++ b/repository/BioTools/BioEntrezXmlReader.class.st @@ -3,7 +3,9 @@ This class is for future usage " Class { - #name : #BioEntrezXmlReader, - #superclass : #BioReader, - #category : #'BioTools-IO' + #name : 'BioEntrezXmlReader', + #superclass : 'BioReader', + #category : 'BioTools-IO', + #package : 'BioTools', + #tag : 'IO' } diff --git a/repository/BioTools/BioErrorSpecificationObject.class.st b/repository/BioTools/BioErrorSpecificationObject.class.st index e9bee02f..d9031d5c 100644 --- a/repository/BioTools/BioErrorSpecificationObject.class.st +++ b/repository/BioTools/BioErrorSpecificationObject.class.st @@ -10,7 +10,9 @@ and in the following way: self signalInvalidObject: 'message' , ex messageText. " Class { - #name : #BioErrorSpecificationObject, - #superclass : #BioException, - #category : #'BioTools-Exceptions' + #name : 'BioErrorSpecificationObject', + #superclass : 'BioException', + #category : 'BioTools-Exceptions', + #package : 'BioTools', + #tag : 'Exceptions' } diff --git a/repository/BioTools/BioException.class.st b/repository/BioTools/BioException.class.st index 6606e9ec..1edb5b08 100644 --- a/repository/BioTools/BioException.class.st +++ b/repository/BioTools/BioException.class.st @@ -4,8 +4,8 @@ BioException is the superclass of all exceptions related to BioSmalltalk. " Class { - #name : #BioException, - #superclass : #Exception, + #name : 'BioException', + #superclass : 'Exception', #instVars : [ 'exceptionDate' ], @@ -15,34 +15,36 @@ Class { 'ShowWarning', 'UseLogger' ], - #category : #'BioTools-Exceptions' + #category : 'BioTools-Exceptions', + #package : 'BioTools', + #tag : 'Exceptions' } -{ #category : #accessing } +{ #category : 'accessing' } BioException class >> logger [ ^ Logger ifNil: [ Logger := Set new ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioException class >> logger: anObject [ Logger := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioException class >> raiseWarning [ ^ RaiseWarning ifNil: [ RaiseWarning := true ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioException class >> raiseWarning: anObject [ RaiseWarning := anObject ] -{ #category : #'initialize-release' } +{ #category : 'initialize-release' } BioException class >> release [ " Private - Do some cleanup. @@ -53,19 +55,19 @@ BioException class >> release [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioException class >> showWarning [ ^ ShowWarning ifNil: [ ShowWarning := true ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioException class >> showWarning: anObject [ ShowWarning := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioException class >> useLogger [ " Logger should be used only for debugging purposes " @@ -73,12 +75,12 @@ BioException class >> useLogger [ ifNil: [ UseLogger := false ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioException class >> useLogger: anObject [ UseLogger := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioException >> defaultAction [ "The default action taken if the exception is signaled." @@ -91,33 +93,33 @@ BioException >> defaultAction [ ^ nil ] -{ #category : #accessing } +{ #category : 'accessing' } BioException >> exceptionDate [ ^ exceptionDate ] -{ #category : #accessing } +{ #category : 'accessing' } BioException >> exceptionDate: anObject [ exceptionDate := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioException >> logger [ ^ self class logger ] -{ #category : #accessing } +{ #category : 'accessing' } BioException >> raiseWarning [ ^ self class raiseWarning ] -{ #category : #accessing } +{ #category : 'accessing' } BioException >> showWarning [ ^ self class showWarning ] -{ #category : #accessing } +{ #category : 'accessing' } BioException >> useLogger [ " Answer if logger usage is enabled " diff --git a/repository/BioTools/BioExecutionEngine.class.st b/repository/BioTools/BioExecutionEngine.class.st index 266d7860..dc0bdd7e 100644 --- a/repository/BioTools/BioExecutionEngine.class.st +++ b/repository/BioTools/BioExecutionEngine.class.st @@ -3,51 +3,53 @@ Abstracts different types of Operating System ""executor"" classes. " Class { - #name : #BioExecutionEngine, - #superclass : #BioAbstractAdapter, + #name : 'BioExecutionEngine', + #superclass : 'BioAbstractAdapter', #classInstVars : [ 'programLocation', 'monitoringDelay' ], - #category : #'BioTools-Adapters' + #category : 'BioTools-Adapters', + #package : 'BioTools', + #tag : 'Adapters' } -{ #category : #defaults } +{ #category : 'defaults' } BioExecutionEngine class >> defaultMonitoringDelay [ " Answer a of seconds to wait between progress update on execution " ^ 2 ] -{ #category : #accessing } +{ #category : 'accessing' } BioExecutionEngine class >> execNameFor: programName [ " Answer a String with the fully qualified name for programName, i.e. if programName is 'blast' then in Windows family the answer will be 'blast.exe' " ^ BioOSInterfaceEngine execNameFor: programName ] -{ #category : #accessing } +{ #category : 'accessing' } BioExecutionEngine class >> execute: programName [ " Execute programName and answer a resulting " ^ self adapterClass executeCommand: programName ] -{ #category : #accessing } +{ #category : 'accessing' } BioExecutionEngine class >> executeCommand: aCommandName [ " Execute aCommandName. Answer an empty if aCommandName is not found, otherwhise answer the aCommandName output " ^ self adapterClass executeCommand: aCommandName ] -{ #category : #accessing } +{ #category : 'accessing' } BioExecutionEngine class >> executeCommand: aCommandName parameter: parameterName [ " Execute aCommandName with parameterName, Answer an empty String if aCommandName is not found , otherwhise answer the aCommandName output " ^ self adapterClass executeCommand: aCommandName parameter: parameterName ] -{ #category : #accessing } +{ #category : 'accessing' } BioExecutionEngine class >> executeCygWin: programName [ " Execute programName in a cygwin environment and answer a resulting " @@ -61,21 +63,21 @@ BioExecutionEngine class >> executeCygWin: programName [ ^ self adapterClass executeCommand: (cmdLine joinUsing: Character space) ] -{ #category : #accessing } +{ #category : 'accessing' } BioExecutionEngine class >> executeMonitoring: aCommandName [ " Execute aCommandName monitoring its output. Answer an empty if aCommandName is not found, otherwhise answer the aCommandName output " ^ self adapterClass executeMonitoring: aCommandName ] -{ #category : #accessing } +{ #category : 'accessing' } BioExecutionEngine class >> locateProgram: programName [ "Answer a with the full qualified path to programName if can be located by the which command" ^ self adapterClass locateProgram: programName ] -{ #category : #accessing } +{ #category : 'accessing' } BioExecutionEngine class >> monitoringDelay [ " Answer a of seconds to wait between progress update on execution " @@ -83,32 +85,32 @@ BioExecutionEngine class >> monitoringDelay [ ifNil: [ monitoringDelay := self defaultMonitoringDelay ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioExecutionEngine class >> monitoringDelay: anObject [ monitoringDelay := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioExecutionEngine class >> notifyExecutionEnd [ " Send a notifying progress update on the receiver's command " Transcript show: Time now asString , ' finalized'; cr ] -{ #category : #accessing } +{ #category : 'accessing' } BioExecutionEngine class >> notifyExecutionProgress [ " Send a notifying progress update on the receiver's command " Transcript show: Time now asString , ' executing'; cr ] -{ #category : #accessing } +{ #category : 'accessing' } BioExecutionEngine class >> programLocation [ ^ programLocation ifNil: [ programLocation := String empty ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioExecutionEngine class >> programLocation: aString [ " Set the receiver's aString as non-standard location " diff --git a/repository/BioTools/BioExon.class.st b/repository/BioTools/BioExon.class.st index 9acc4a0f..f4bd5ae3 100644 --- a/repository/BioTools/BioExon.class.st +++ b/repository/BioTools/BioExon.class.st @@ -1,52 +1,54 @@ Class { - #name : #BioExon, - #superclass : #BioSequenceFeature, + #name : 'BioExon', + #superclass : 'BioSequenceFeature', #instVars : [ 'gene', 'type', 'transcripts' ], - #category : #'BioTools-Sequences' + #category : 'BioTools-Sequences', + #package : 'BioTools', + #tag : 'Sequences' } -{ #category : #adding } +{ #category : 'adding' } BioExon >> addTranscript: aBioTranscript [ self transcripts add: aBioTranscript ] -{ #category : #accessing } +{ #category : 'accessing' } BioExon >> gene [ ^ gene ] -{ #category : #accessing } +{ #category : 'accessing' } BioExon >> gene: anObject [ gene := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioExon >> transcripts [ ^ transcripts ifNil: [ transcripts := OrderedCollection new ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioExon >> transcripts: anObject [ transcripts := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioExon >> type [ ^ type ] -{ #category : #accessing } +{ #category : 'accessing' } BioExon >> type: anObject [ type := anObject diff --git a/repository/BioTools/BioFAOPanel.class.st b/repository/BioTools/BioFAOPanel.class.st index 15f22f2f..51df0a6e 100644 --- a/repository/BioTools/BioFAOPanel.class.st +++ b/repository/BioTools/BioFAOPanel.class.st @@ -3,12 +3,14 @@ Represents a panel of loci recommended by the Food and Agriculture Organization " Class { - #name : #BioFAOPanel, - #superclass : #BioPanel, - #category : #'BioTools-Repeats' + #name : 'BioFAOPanel', + #superclass : 'BioPanel', + #category : 'BioTools-Repeats', + #package : 'BioTools', + #tag : 'Repeats' } -{ #category : #'accessing - cattle' } +{ #category : 'accessing - cattle' } BioFAOPanel class >> markerAlleleRangesForCattle [ ^ #( @@ -21,7 +23,7 @@ BioFAOPanel class >> markerAlleleRangesForCattle [ ) ] -{ #category : #accessing } +{ #category : 'accessing' } BioFAOPanel class >> markersForSpecies [ " Answer a of for the receiver's panel " @@ -30,14 +32,14 @@ BioFAOPanel class >> markersForSpecies [ yourself ] -{ #category : #accessing } +{ #category : 'accessing' } BioFAOPanel class >> panelName [ " Private - See superimplementor's comment " ^ 'FAO' ] -{ #category : #accessing } +{ #category : 'accessing' } BioFAOPanel class >> supportedMarkerTypes [ " Answer a of supported types of markers " diff --git a/repository/BioTools/BioFLSerializer.class.st b/repository/BioTools/BioFLSerializer.class.st index faf4a1e0..65e5084a 100644 --- a/repository/BioTools/BioFLSerializer.class.st +++ b/repository/BioTools/BioFLSerializer.class.st @@ -6,26 +6,28 @@ See [the Fuel homepage](http://rmod.lille.inria.fr/web/pier/software/Fuel) for d " Class { - #name : #BioFLSerializer, - #superclass : #BioSerializationEngine, - #category : #'BioTools-Adapters' + #name : 'BioFLSerializer', + #superclass : 'BioSerializationEngine', + #category : 'BioTools-Adapters', + #package : 'BioTools', + #tag : 'Adapters' } -{ #category : #testing } +{ #category : 'testing' } BioFLSerializer class >> isPreferredAdapter [ " Private - See superimplementor's comment " ^ true ] -{ #category : #accessing } +{ #category : 'accessing' } BioFLSerializer class >> providerClass [ " See superimplementor's comment " ^ #FLSerializer ] -{ #category : #'initialize-release' } +{ #category : 'initialize-release' } BioFLSerializer >> initializeWith: aProviderClass [ " Private - See superimplementor's comment " @@ -37,7 +39,7 @@ BioFLSerializer >> initializeWith: aProviderClass [ super initializeWith: serializer ] -{ #category : #accessing } +{ #category : 'accessing' } BioFLSerializer >> materialize [ " See superimplementor comment " @@ -47,7 +49,7 @@ BioFLSerializer >> materialize [ ifFalse: [ self error: self location , ' is not a valid file for materialization' translated ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioFLSerializer >> serialize: anObject [ " See superimplementor comment " diff --git a/repository/BioTools/BioFTPDownloader.trait.st b/repository/BioTools/BioFTPDownloader.trait.st index 282d582f..ed197162 100644 --- a/repository/BioTools/BioFTPDownloader.trait.st +++ b/repository/BioTools/BioFTPDownloader.trait.st @@ -1,11 +1,13 @@ Trait { - #name : #BioFTPDownloader, + #name : 'BioFTPDownloader', #traits : 'BioDownloader', #classTraits : 'BioDownloader classTrait', - #category : #'BioTools-Helpers' + #category : 'BioTools-Helpers', + #package : 'BioTools', + #tag : 'Helpers' } -{ #category : #downloading } +{ #category : 'downloading' } BioFTPDownloader >> connect [ " Private - Connect the receiver's to download databases " @@ -19,7 +21,7 @@ BioFTPDownloader >> connect [ self client binary. ] -{ #category : #downloading } +{ #category : 'downloading' } BioFTPDownloader >> ftpClientClass [ " Answer a class for handling FTP connections " diff --git a/repository/BioTools/BioFastaMultiRecord.class.st b/repository/BioTools/BioFastaMultiRecord.class.st index 4edf8c12..a8ece17f 100644 --- a/repository/BioTools/BioFastaMultiRecord.class.st +++ b/repository/BioTools/BioFastaMultiRecord.class.st @@ -7,15 +7,17 @@ Instance Variables " Class { - #name : #BioFastaMultiRecord, - #superclass : #BioNamedObject, + #name : 'BioFastaMultiRecord', + #superclass : 'BioNamedObject', #instVars : [ 'records' ], - #category : #'BioTools-Core' + #category : 'BioTools-Core', + #package : 'BioTools', + #tag : 'Core' } -{ #category : #examples } +{ #category : 'examples' } BioFastaMultiRecord class >> examplePlotHistogram [ (BioParser parseMultiFastaFile: BioObject testFilesFullDirectoryName / 'ls_orchid.fasta') @@ -25,14 +27,14 @@ BioFastaMultiRecord class >> examplePlotHistogram [ color: Color red ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioFastaMultiRecord class >> from: aCollection [ " Answer a new instance of the receiver with records taken from aCollection " ^ self new initializeWith: aCollection ] -{ #category : #comparing } +{ #category : 'comparing' } BioFastaMultiRecord >> = aFastaMultiRecord [ " Two multi fasta are equal if (a) they are the same 'kind' of thing. @@ -47,14 +49,14 @@ BioFastaMultiRecord >> = aFastaMultiRecord [ ^ true ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaMultiRecord >> addFastaRecord: aBioFastaRecord [ " Add aBioFastaRecord to the receiver. " self records add: aBioFastaRecord ] -{ #category : #alignment } +{ #category : 'alignment' } BioFastaMultiRecord >> alignWithMAFFTTo: outputFilename [ ^ BioMAFFTWrapper new @@ -65,7 +67,7 @@ BioFastaMultiRecord >> alignWithMAFFTTo: outputFilename [ execute. ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaMultiRecord >> alphabet: aBioAlphabetClass [ " Set the receiver's fasta records alphabet to aBioAlphabetClass " @@ -73,7 +75,7 @@ BioFastaMultiRecord >> alphabet: aBioAlphabetClass [ ] -{ #category : #converting } +{ #category : 'converting' } BioFastaMultiRecord >> asAlignment [ " Answer a representation of the receiver " @@ -85,14 +87,14 @@ BioFastaMultiRecord >> asAlignment [ ] -{ #category : #alignment } +{ #category : 'alignment' } BioFastaMultiRecord >> asMAFFTWrapperInput: aBioMAFFTWrapper [ self dumpToStream: 'in.tmp' asFileReference writeStream. aBioMAFFTWrapper addParameter: 'in.tmp' ] -{ #category : #converting } +{ #category : 'converting' } BioFastaMultiRecord >> asString [ " Answer the String representation of the receiver." @@ -100,70 +102,70 @@ BioFastaMultiRecord >> asString [ self records do: [ : record | stream nextPutAll: record asString ] ] ] -{ #category : #alignment } +{ #category : 'alignment' } BioFastaMultiRecord >> average [ "Answer a with the average length of sequences in the receiver" ^ self length / self size ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaMultiRecord >> collect: aBlock [ " Evaluate aBlock with each of the receiver's fasta record as the argument. " ^ self records collect: aBlock ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaMultiRecord >> contents [ " Answer the receiver's current records " ^ self ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaMultiRecord >> do: aBlock [ " Evaluate aBlock with each of the receiver's fasta record as the argument " self records do: aBlock ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaMultiRecord >> dumpToStream: aStream [ " Private - Write the receiver's contents into aStream " self records dumpToStream: aStream ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaMultiRecord >> first [ "Answer the first receiver's fasta record" ^ self records first ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaMultiRecord >> gcContent [ " Answer a with the FASTA identifier as key and the resulting GC content as value " ^ (self collect: [ : fr | fr sequenceName -> fr gcContent ]) asDictionary ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaMultiRecord >> groupedBySeqLength [ " Answer a of grouped by sequence length " ^ self records groupedBy: #size ] -{ #category : #testing } +{ #category : 'testing' } BioFastaMultiRecord >> hasGaps [ " Answer if any of the receiver's records contains any gap " ^ self records anySatisfy: #hasGaps ] -{ #category : #testing } +{ #category : 'testing' } BioFastaMultiRecord >> hasSameLength [ " Answer if all sequences in the receiver has the same size " @@ -172,28 +174,28 @@ BioFastaMultiRecord >> hasSameLength [ ^ self sequences allSatisfy: [ : each | each size = seqSize ] ] -{ #category : #comparing } +{ #category : 'comparing' } BioFastaMultiRecord >> hash [ " Private - hash is implemented because #= is implemented " ^ self records hash bitXor: self size hash ] -{ #category : #comparing } +{ #category : 'comparing' } BioFastaMultiRecord >> includes: aFastaRecord [ " Answer whether aFastaRecord is one of the receiver's elements. " ^ self records includes: aFastaRecord ] -{ #category : #testing } +{ #category : 'testing' } BioFastaMultiRecord >> includesName: aString [ " Answer whether the receiver contains a sequence named aString. " ^ self sequenceNames includes: aString ] -{ #category : #'initialize-release' } +{ #category : 'initialize-release' } BioFastaMultiRecord >> initializeWith: aCollection [ " Private - Set the receiver's fasta records from aMultiFastaString " @@ -201,42 +203,42 @@ BioFastaMultiRecord >> initializeWith: aCollection [ ] -{ #category : #testing } +{ #category : 'testing' } BioFastaMultiRecord >> isEmpty [ " Answer whether the receiver contains any elements. " ^ self records isEmpty ] -{ #category : #testing } +{ #category : 'testing' } BioFastaMultiRecord >> isFastaMultiRecord [ " See superimplementor's comment " ^ true ] -{ #category : #testing } +{ #category : 'testing' } BioFastaMultiRecord >> isSorted [ " Answer if the receiver is sorted by sequence name " ^ self records isSorted ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaMultiRecord >> last [ "Answer the last receiver's fasta record" ^ self records last ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaMultiRecord >> length [ "Answer a representing the length of the total sequences combined in the receiver" ^ self sequences sum: #length ] -{ #category : #comparing } +{ #category : 'comparing' } BioFastaMultiRecord >> like: aFastaMultiRecord [ " Two multi fasta are alike if (a) they are equal @@ -249,21 +251,21 @@ BioFastaMultiRecord >> like: aFastaMultiRecord [ ^ true ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaMultiRecord >> molecularWeight [ " Answer the receiver's DNA Molecular Weight " ^ self collect: #molecularWeight ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaMultiRecord >> occurrencesOfLetters [ " Answer a of occurrence mappings for the receiver " ^ (self collect: [ : fr | fr sequenceName -> fr occurrencesOfLetters ]) asDictionary ] -{ #category : #printing } +{ #category : 'printing' } BioFastaMultiRecord >> printOn: aStream [ " Private - See superimplementor's comment " @@ -272,7 +274,7 @@ BioFastaMultiRecord >> printOn: aStream [ nextPutAll: self size between: $( and: $). ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaMultiRecord >> records [ " Answer a of with the receiver's sequences " @@ -280,12 +282,12 @@ BioFastaMultiRecord >> records [ ifNil: [ records := OrderedCollection new ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaMultiRecord >> records: anObject [ records := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaMultiRecord >> renameFromDictionary: aDictionary [ " Take aDictionary and rename each record accordingly " @@ -299,7 +301,7 @@ BioFastaMultiRecord >> renameFromDictionary: aDictionary [ fastaRecord name: newName ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaMultiRecord >> reverseComplement [ " Answer a copy of the receiver's sequence complemented and with element order reversed. " @@ -307,7 +309,7 @@ BioFastaMultiRecord >> reverseComplement [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaMultiRecord >> select: aBlock [ " Evaluate aBlock with each of the receiver's fasta records as the argument. Collect into a new collection like the receiver, only those elements for @@ -319,35 +321,35 @@ BioFastaMultiRecord >> select: aBlock [ ^ newInstance ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaMultiRecord >> sequenceNames [ " Answer a with receiver's sequence headers " ^ self records collect: #sequenceName ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaMultiRecord >> sequenceStrings [ " Answer a with receiver's sequence strings " ^ self records collect: #sequenceString ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaMultiRecord >> sequences [ " Answer a of with the receiver's sequences " ^ self records collect: #sequence ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaMultiRecord >> size [ " Answer an with the number of records in the receiver " ^ self records size ] -{ #category : #converting } +{ #category : 'converting' } BioFastaMultiRecord >> sort [ " Sort records by sequence name. Answer a new instance of the receiver " diff --git a/repository/BioTools/BioFastaRecord.class.st b/repository/BioTools/BioFastaRecord.class.st index 10a9bbc6..d4e80e9a 100644 --- a/repository/BioTools/BioFastaRecord.class.st +++ b/repository/BioTools/BioFastaRecord.class.st @@ -1,14 +1,16 @@ Class { - #name : #BioFastaRecord, - #superclass : #BioNamedObject, + #name : 'BioFastaRecord', + #superclass : 'BioNamedObject', #instVars : [ 'sequence', 'identifiers' ], - #category : #'BioTools-Core' + #category : 'BioTools-Core', + #package : 'BioTools', + #tag : 'Core' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioFastaRecord class >> named: aBioObject sequence: aSequence [ " Answer a new instance of the receiver with header line aNameString and aSeqString as sequence " @@ -18,7 +20,7 @@ BioFastaRecord class >> named: aBioObject sequence: aSequence [ yourself ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioFastaRecord class >> named: aBioObject sequence: aSequence alphabet: anAlphabetString [ " Answer a new instance of the receiver with header line aNameString and aSeqString as sequence " @@ -30,7 +32,7 @@ BioFastaRecord class >> named: aBioObject sequence: aSequence alphabet: anAlphab yourself ] -{ #category : #comparing } +{ #category : 'comparing' } BioFastaRecord >> <= aBioFastaRecord [ " Answer whether the receivers's sequence name sorts before aString. The collation order is simple ascii (with case differences). " @@ -38,7 +40,7 @@ BioFastaRecord >> <= aBioFastaRecord [ ^ self name <= aBioFastaRecord name ] -{ #category : #comparing } +{ #category : 'comparing' } BioFastaRecord >> = aFastaRecord [ " Two fasta records are equal if (a) they are the same 'kind' of thing. @@ -51,7 +53,7 @@ BioFastaRecord >> = aFastaRecord [ ^ self sequence = aFastaRecord sequence ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaRecord >> addIdentifiers: aCollection [ aCollection allButLast ifNotEmpty: [ @@ -59,21 +61,21 @@ BioFastaRecord >> addIdentifiers: aCollection [ self identifiers at: k put: v ] ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaRecord >> alphabet: aBioAlphabetClass [ " Set the receiver's sequence alphabet to aBioAlphabetClass " self sequence alphabet: aBioAlphabetClass new ] -{ #category : #converting } +{ #category : 'converting' } BioFastaRecord >> asFastaRecord [ " Answer a " ^ self ] -{ #category : #converting } +{ #category : 'converting' } BioFastaRecord >> asString [ " Answer the String representation of the receiver." @@ -86,7 +88,7 @@ BioFastaRecord >> asString [ cr ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaRecord >> dnaMwDoubleCircular [ | mw_direct_strand | @@ -108,7 +110,7 @@ BioFastaRecord >> dnaMwDoubleCircular [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaRecord >> dnaMwDoubleLinear [ | mw_direct_strand | @@ -130,7 +132,7 @@ BioFastaRecord >> dnaMwDoubleLinear [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaRecord >> dnaMwSingleCircular [ | oh mw_direct_strand | @@ -153,7 +155,7 @@ BioFastaRecord >> dnaMwSingleCircular [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaRecord >> dnaMwSingleLinear [ | mw_direct_strand | @@ -175,7 +177,7 @@ BioFastaRecord >> dnaMwSingleLinear [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaRecord >> dumpToStream: aStream [ " Private - Write the receiver's contents into aStream " @@ -187,27 +189,27 @@ BioFastaRecord >> dumpToStream: aStream [ bioCr ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaRecord >> gcContent [ " Refer to comment in #gcContent " ^ self sequence gcContent ] -{ #category : #testing } +{ #category : 'testing' } BioFastaRecord >> hasGaps [ ^ self sequenceString includes: '-' ] -{ #category : #comparing } +{ #category : 'comparing' } BioFastaRecord >> hash [ " Private - hash is implemented because #= is implemented " ^ self identifiers hash bitXor: self sequence hash ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaRecord >> identifiers [ "Answer a of identifiers of the receiver" @@ -215,14 +217,14 @@ BioFastaRecord >> identifiers [ ifNil: [ identifiers := Dictionary new ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaRecord >> identifiers: aCollection [ " Set the receiver's identifiers to aCollection " identifiers := aCollection ] -{ #category : #'initialize-release' } +{ #category : 'initialize-release' } BioFastaRecord >> initializeName: aNameString sequence: aString [ " Private - Initialize the receiver's name and sequence " @@ -230,7 +232,7 @@ BioFastaRecord >> initializeName: aNameString sequence: aString [ self sequence: (aString asSequenceForAlphabet: BioNullAlphabet). ] -{ #category : #'initialize-release' } +{ #category : 'initialize-release' } BioFastaRecord >> initializeName: aNameString sequence: aString alphabet: anAlphabet [ " Private - Initialize the receiver's name, sequence and alphabet " @@ -238,21 +240,21 @@ BioFastaRecord >> initializeName: aNameString sequence: aString alphabet: anAlph self sequence: (aString asSequenceForAlphabet: anAlphabet). ] -{ #category : #testing } +{ #category : 'testing' } BioFastaRecord >> isEmpty [ " Answer if the receiver does not contain either a name / header description or a sequence " ^ self hasName not and: [ self sequenceString isEmpty not ] ] -{ #category : #testing } +{ #category : 'testing' } BioFastaRecord >> isFastaRecord [ " See superimplementor's comment " ^ true ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaRecord >> molecularWeight [ ^ self sequence hasAmbiguousBases @@ -260,14 +262,14 @@ BioFastaRecord >> molecularWeight [ ifFalse: [ self sequence molecularWeightNonDegen ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaRecord >> occurrencesOfLetters [ "Answer a of occurrence mappings for the receiver " ^ self sequence occurrencesOfLetters ] -{ #category : #printing } +{ #category : 'printing' } BioFastaRecord >> printOn: aStream [ " Private - See superimplementor's comment " @@ -277,7 +279,7 @@ BioFastaRecord >> printOn: aStream [ nextPutAll: self name. ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaRecord >> reverseComplement [ " Answer a copy of the receiver's sequence complemented and with element order reversed. " @@ -291,21 +293,21 @@ BioFastaRecord >> reverseComplement [ yourself ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaRecord >> sequence [ " Answer a BioSequence " ^ sequence ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaRecord >> sequence: aBioSequence [ "Set the receiver's sequence to aBioSequence" sequence := aBioSequence ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaRecord >> sequenceName [ " Answer a with the receiver's sequence header " @@ -316,28 +318,28 @@ BioFastaRecord >> sequenceName [ ifFalse: [ seqName ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaRecord >> sequenceNameWithoutDelimiter [ " Answer a with the receiver's sequence header without the $> character " ^ self name allButFirst ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaRecord >> sequenceString [ " Answer a with the receiver's sequence " ^ sequence asString ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaRecord >> size [ " Answer a with the size of the receiver's sequence " ^ self sequence size ] -{ #category : #accessing } +{ #category : 'accessing' } BioFastaRecord >> translate [ "Answer the receiver's translated to its corresponding Protein, adjusting the alphabet." diff --git a/repository/BioTools/BioFileCollection.class.st b/repository/BioTools/BioFileCollection.class.st index ff4ba814..b6387850 100644 --- a/repository/BioTools/BioFileCollection.class.st +++ b/repository/BioTools/BioFileCollection.class.st @@ -4,19 +4,21 @@ Abstract class grouping behavior for file collection objects. Behavior includes " Class { - #name : #BioFileCollection, - #superclass : #BioOrderedCollection, - #category : #'BioTools-Collections' + #name : 'BioFileCollection', + #superclass : 'BioOrderedCollection', + #category : 'BioTools-Collections', + #package : 'BioTools', + #tag : 'Collections' } -{ #category : #accessing } +{ #category : 'accessing' } BioFileCollection class >> fileClass [ " Answer the class of the containee elements " self subclassResponsibility ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioFileCollection class >> filesFromDirectory: aDirectoryString [ " Answer a Collection of files iterating recursively over the files located at aDirectoryString " @@ -27,7 +29,7 @@ BioFileCollection class >> filesFromDirectory: aDirectoryString [ ifTrue: [ self filesFromDirectory: entry fullName ] ]) joinUsing: Array new. ] -{ #category : #printing } +{ #category : 'printing' } BioFileCollection >> printOn: aStream [ " Private - See superimplementor's comment " diff --git a/repository/BioTools/BioFilter.class.st b/repository/BioTools/BioFilter.class.st index 74486776..51fb6ca4 100644 --- a/repository/BioTools/BioFilter.class.st +++ b/repository/BioTools/BioFilter.class.st @@ -9,30 +9,32 @@ Instance Variables: contents " Class { - #name : #BioFilter, - #superclass : #BioNamedObject, + #name : 'BioFilter', + #superclass : 'BioNamedObject', #instVars : [ 'reader', 'cumulative', 'contents' ], - #category : #'BioTools-Query' + #category : 'BioTools-Query', + #package : 'BioTools', + #tag : 'Query' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioFilter class >> newFromCollection: aCollection [ ^ self new contents: aCollection ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioFilter class >> newFromReader: aReader [ " Answer a new instance of the receiver setting its reader " ^ self new reader: aReader ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioFilter class >> newFromXML: aFileLocation [ ^ self newFromReader: (self reader @@ -40,7 +42,7 @@ BioFilter class >> newFromXML: aFileLocation [ yourself) ] -{ #category : #accessing } +{ #category : 'accessing' } BioFilter >> addFilterFrom: collection [ " Private - Create a new result from aCollection and link the receiver to its reader " @@ -60,7 +62,7 @@ BioFilter >> addFilterFrom: collection [ ^ filterResult ] -{ #category : #accessing } +{ #category : 'accessing' } BioFilter >> addFilteredResult: aFilteredResult [ " Add aFilter to the receiver filtered results " @@ -72,67 +74,67 @@ BioFilter >> addFilteredResult: aFilteredResult [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioFilter >> beCumulative [ " Set the receiver to not update its reader's contents " cumulative := true ] -{ #category : #accessing } +{ #category : 'accessing' } BioFilter >> beSubtractive [ " Set the receiver to not update its reader's contents " cumulative := false ] -{ #category : #accessing } +{ #category : 'accessing' } BioFilter >> contents [ " Answer a GTSearchResult from the receiver " ^ contents ] -{ #category : #accessing } +{ #category : 'accessing' } BioFilter >> contents: anObject [ contents := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioFilter >> defaultReaderClass [ self subclassResponsibility ] -{ #category : #'iterating elements' } +{ #category : 'iterating elements' } BioFilter >> do: aBlock [ "Refer to the comment in Collection|do:." ^ contents do: aBlock ] -{ #category : #private } +{ #category : 'private' } BioFilter >> filteredResult [ " Answer a " ^ self contents ] -{ #category : #private } +{ #category : 'private' } BioFilter >> filteredResultContents [ " Answer the filtered results " ^ self filteredResult contents ] -{ #category : #accessing } +{ #category : 'accessing' } BioFilter >> filtersCount [ " Refer to comment in BioFilteredReader " ^ self reader filtersCount ] -{ #category : #'initialize-release' } +{ #category : 'initialize-release' } BioFilter >> initialize [ " Private - See superimplementor's comment " @@ -140,33 +142,33 @@ BioFilter >> initialize [ cumulative := true. ] -{ #category : #testing } +{ #category : 'testing' } BioFilter >> isCumulativeFilter [ ^ cumulative ] -{ #category : #testing } +{ #category : 'testing' } BioFilter >> isEmpty [ "Answer whether the receiver contains any elements." ^ self contents isEmpty ] -{ #category : #accessing } +{ #category : 'accessing' } BioFilter >> lastResult [ ^ self contents contents ] -{ #category : #private } +{ #category : 'private' } BioFilter >> newFilteredResult: collection [ " Answer a new filtered result object with contents from collection. If collection is splitted in several sub-collections, then join them " ^ BioFilteredResult new result: collection ] -{ #category : #printing } +{ #category : 'printing' } BioFilter >> printOn: aStream [ " Private - See superimplementor's comment " @@ -180,21 +182,21 @@ BioFilter >> printOn: aStream [ nextPut: $) ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioFilter >> reader [ ^ reader ifNil: [ reader := self defaultReaderClass new ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioFilter >> reader: anObject [ reader := anObject. ] -{ #category : #accessing } +{ #category : 'accessing' } BioFilter >> size [ ^ self contents size diff --git a/repository/BioTools/BioFilteredReader.class.st b/repository/BioTools/BioFilteredReader.class.st index 29b93168..d43bc33c 100644 --- a/repository/BioTools/BioFilteredReader.class.st +++ b/repository/BioTools/BioFilteredReader.class.st @@ -4,18 +4,20 @@ BioFilteredReader is a reader which incorporates filtering capabilities. filterClass Stores a BioFilter class which is instantiated through #filter message. " Class { - #name : #BioFilteredReader, - #superclass : #BioReader, + #name : 'BioFilteredReader', + #superclass : 'BioReader', #instVars : [ 'filters', 'filterClass', 'queryFilters', 'classifier' ], - #category : #'BioTools-IO' + #category : 'BioTools-IO', + #package : 'BioTools', + #tag : 'IO' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioFilteredReader class >> newFromFilter: aBioFilter [ " Answer a new reader using file located at aFileLocationOrString " @@ -24,7 +26,7 @@ BioFilteredReader class >> newFromFilter: aBioFilter [ yourself ] -{ #category : #'accessing filters' } +{ #category : 'accessing filters' } BioFilteredReader >> addFilter: aFilter [ " Add aFilter to the receiver filtered results " @@ -33,30 +35,30 @@ BioFilteredReader >> addFilter: aFilter [ ^ aFilter ] -{ #category : #'accessing-query filters' } +{ #category : 'accessing-query filters' } BioFilteredReader >> addQueryFilter: anObject [ self queryFilters add: anObject ] -{ #category : #'accessing filters' } +{ #category : 'accessing filters' } BioFilteredReader >> addResult [ " Add a new result object to the receiver from the receiver's raw contents " self subclassResponsibility ] -{ #category : #accessing } +{ #category : 'accessing' } BioFilteredReader >> classifier [ ^ classifier ] -{ #category : #accessing } +{ #category : 'accessing' } BioFilteredReader >> classifier: anObject [ classifier := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioFilteredReader >> contents [ " This is the protocol. Answer a BioSearchResult, if the receiver already contains filters then answer the result object given by the last filter " @@ -65,26 +67,26 @@ BioFilteredReader >> contents [ ifFalse: [ self lastFilter contents ] ] -{ #category : #'accessing filters' } +{ #category : 'accessing filters' } BioFilteredReader >> filter [ " Answer a filterer for selecting specific results from the receiver " ^ self subclassResponsibility ] -{ #category : #accessing } +{ #category : 'accessing' } BioFilteredReader >> filterClass [ ^ filterClass ifNil: [ filterClass := self defaultFilterClass ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioFilteredReader >> filterClass: anObject [ filterClass := anObject ] -{ #category : #'accessing filters' } +{ #category : 'accessing filters' } BioFilteredReader >> filters [ " Answer a filterer for selecting specific results from the receiver " @@ -93,14 +95,14 @@ BioFilteredReader >> filters [ ] -{ #category : #'accessing filters' } +{ #category : 'accessing filters' } BioFilteredReader >> filtersCount [ " Answer a of how many filter results contains the receiver " ^ self filters size ] -{ #category : #'accessing filters' } +{ #category : 'accessing filters' } BioFilteredReader >> hasCumulativeFilter [ " Answer true if any of the receiver's filters is cumulative. This implies that subsequent filters will be applied to the found cumulative filter " @@ -108,28 +110,28 @@ BioFilteredReader >> hasCumulativeFilter [ ^ self filters anySatisfy:[ : f | f isCumulativeFilter ] ] -{ #category : #'accessing filters' } +{ #category : 'accessing filters' } BioFilteredReader >> hasFilterResults [ " Answer true if any of the receiver's filters is populated with results " ^ self filters isEmpty not ] -{ #category : #'accessing filters' } +{ #category : 'accessing filters' } BioFilteredReader >> initialResult [ " Answer the latest filtered result object in the receiver's filtered results " ^ self contents first ] -{ #category : #'accessing filters' } +{ #category : 'accessing filters' } BioFilteredReader >> lastCumulativeFilter [ " Answer the last filter from the receiver's filters which is cumulative " ^ self filters reversed detect: #isCumulativeFilter ] -{ #category : #'accessing filters' } +{ #category : 'accessing filters' } BioFilteredReader >> lastFilter [ ^ self filters notEmpty @@ -137,18 +139,18 @@ BioFilteredReader >> lastFilter [ ifFalse: [ nil ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioFilteredReader >> queryFilters [ ^ queryFilters ifNil: [ queryFilters := OrderedCollection new ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioFilteredReader >> queryFilters: anObject [ queryFilters := anObject ] -{ #category : #'accessing filters' } +{ #category : 'accessing filters' } BioFilteredReader >> removeAllFilters [ " Remove all filters in the receiver. Answer the receiver " @@ -156,7 +158,7 @@ BioFilteredReader >> removeAllFilters [ self queryFilters removeAll. ] -{ #category : #'accessing filters' } +{ #category : 'accessing filters' } BioFilteredReader >> removeFilter: aFilter [ " Add aFilter to the receiver filtered results. Answer the receiver " @@ -170,13 +172,13 @@ BioFilteredReader >> removeFilter: aFilter [ ifNotNil: [ self queryFilters remove: queryFilter ] ] -{ #category : #'accessing-query filters' } +{ #category : 'accessing-query filters' } BioFilteredReader >> removeQueryFilter: anObject [ self queryFilters remove: anObject ] -{ #category : #'accessing filters' } +{ #category : 'accessing filters' } BioFilteredReader >> result [ " Answer the latest filtered result object in the receiver's filtered results " diff --git a/repository/BioTools/BioFilteredResult.class.st b/repository/BioTools/BioFilteredResult.class.st index 5abeea69..25acc640 100644 --- a/repository/BioTools/BioFilteredResult.class.st +++ b/repository/BioTools/BioFilteredResult.class.st @@ -7,38 +7,40 @@ Instance Variables " Class { - #name : #BioFilteredResult, - #superclass : #BioResultObject, + #name : 'BioFilteredResult', + #superclass : 'BioResultObject', #instVars : [ 'filter' ], - #category : #'BioTools-Query' + #category : 'BioTools-Query', + #package : 'BioTools', + #tag : 'Query' } -{ #category : #accessing } +{ #category : 'accessing' } BioFilteredResult >> collect: aBlock [ " self needsWork." ^ self result collect: aBlock ] -{ #category : #'accessing private' } +{ #category : 'accessing private' } BioFilteredResult >> definitionString [ ^ 'Filter' ] -{ #category : #accessing } +{ #category : 'accessing' } BioFilteredResult >> filter [ ^ filter ] -{ #category : #accessing } +{ #category : 'accessing' } BioFilteredResult >> filter: anObject [ filter := anObject ] -{ #category : #printing } +{ #category : 'printing' } BioFilteredResult >> printOn: aStream [ " Private - Print the receiver's name and result size " diff --git a/repository/BioTools/BioGene.class.st b/repository/BioTools/BioGene.class.st index 03185f67..31ed41b0 100644 --- a/repository/BioTools/BioGene.class.st +++ b/repository/BioTools/BioGene.class.st @@ -3,8 +3,8 @@ Represents a gene. A gene could be represented as a string of DNA encoding for a " Class { - #name : #BioGene, - #superclass : #BioNamedObject, + #name : 'BioGene', + #superclass : 'BioNamedObject', #instVars : [ 'chromosome', 'proteins', @@ -14,59 +14,61 @@ Class { 'unigeneClusterID', 'sequences' ], - #category : #'BioTools-Biological' + #category : 'BioTools-Biological', + #package : 'BioTools', + #tag : 'Biological' } -{ #category : #comparing } +{ #category : 'comparing' } BioGene >> = aBioGene [ " Answer if receiver's is equal to aBioGene " ^ self class = aBioGene class ] -{ #category : #accessing } +{ #category : 'accessing' } BioGene >> chromosome [ " Answer the receiver's " ^ chromosome ] -{ #category : #accessing } +{ #category : 'accessing' } BioGene >> chromosome: anObject [ chromosome := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioGene >> ensemblGeneID [ ^ ensemblGeneID ] -{ #category : #accessing } +{ #category : 'accessing' } BioGene >> ensemblGeneID: anObject [ ensemblGeneID := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioGene >> entrezGeneID [ ^ entrezGeneID ] -{ #category : #accessing } +{ #category : 'accessing' } BioGene >> entrezGeneID: anObject [ entrezGeneID := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioGene >> geneBankAccession [ ^ geneBankAccession ] -{ #category : #accessing } +{ #category : 'accessing' } BioGene >> geneBankAccession: anObject [ geneBankAccession := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioGene >> proteins [ " Answer a of reciever's protein " @@ -74,27 +76,27 @@ BioGene >> proteins [ ifNil: [ proteins := OrderedCollection new ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioGene >> proteins: anObject [ proteins := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioGene >> sequences [ ^ sequences ] -{ #category : #accessing } +{ #category : 'accessing' } BioGene >> sequences: anObject [ sequences := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioGene >> unigeneClusterID [ ^ unigeneClusterID ] -{ #category : #accessing } +{ #category : 'accessing' } BioGene >> unigeneClusterID: anObject [ unigeneClusterID := anObject ] diff --git a/repository/BioTools/BioGenome.class.st b/repository/BioTools/BioGenome.class.st index 66d2f46e..7b9707cc 100644 --- a/repository/BioTools/BioGenome.class.st +++ b/repository/BioTools/BioGenome.class.st @@ -10,17 +10,19 @@ organism " Class { - #name : #BioGenome, - #superclass : #BioNamedObject, + #name : 'BioGenome', + #superclass : 'BioNamedObject', #instVars : [ 'chromosomes', 'collectionClass', 'organism' ], - #category : #'BioTools-Biological' + #category : 'BioTools-Biological', + #package : 'BioTools', + #tag : 'Biological' } -{ #category : #accessing } +{ #category : 'accessing' } BioGenome >> addChromosome: aBioChromosome [ " Add aBioChromosome to the receiver's chromosomes " @@ -29,14 +31,14 @@ BioGenome >> addChromosome: aBioChromosome [ yourself) ] -{ #category : #accessing } +{ #category : 'accessing' } BioGenome >> addGene: aBioObject [ " Store aBioObject as gene in the receiver's genes " ^ aBioObject addToBioGenome: self ] -{ #category : #accessing } +{ #category : 'accessing' } BioGenome >> chromosomes [ " Answer a of for the receiver " @@ -44,12 +46,12 @@ BioGenome >> chromosomes [ ifNil: [ chromosomes := self collectionClass new ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioGenome >> chromosomes: anObject [ chromosomes := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioGenome >> collectionClass [ " Answer a used to store the receiver's chromosomes " @@ -57,31 +59,31 @@ BioGenome >> collectionClass [ ifNil: [ collectionClass := self defaultCollectionClass ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioGenome >> collectionClass: anObject [ collectionClass := anObject ] -{ #category : #defaults } +{ #category : 'defaults' } BioGenome >> defaultCollectionClass [ " Answer the default class to store chromosomes in the receiver " ^ OrderedCollection ] -{ #category : #accessing } +{ #category : 'accessing' } BioGenome >> genes [ " Answer a of in the receiver " ^ self chromosomes collect: #genes ] -{ #category : #accessing } +{ #category : 'accessing' } BioGenome >> organism [ ^ organism ] -{ #category : #accessing } +{ #category : 'accessing' } BioGenome >> organism: anObject [ organism := anObject ] diff --git a/repository/BioTools/BioGenomicRange.class.st b/repository/BioTools/BioGenomicRange.class.st new file mode 100644 index 00000000..6c4090c1 --- /dev/null +++ b/repository/BioTools/BioGenomicRange.class.st @@ -0,0 +1,112 @@ +Class { + #name : 'BioGenomicRange', + #superclass : 'BioObject', + #instVars : [ + 'seqname', + 'irange', + 'strand', + 'metadata' + ], + #category : 'BioTools-Genomic-Ranges', + #package : 'BioTools', + #tag : 'Genomic-Ranges' +} + +{ #category : 'as yet unclassified' } +BioGenomicRange class >> seqname: aSeqname start: aStart end: anEnd strand: aStrand [ + ^ self new + seqname: aSeqname; + irange: (BioIRanges starts: { aStart } ends: { anEnd }); + strand: (BioStrand from: aStrand); + metadata: Dictionary new; + yourself +] + +{ #category : 'accessing' } +BioGenomicRange >> end [ + ^ irange endAt: 1 +] + +{ #category : 'accessing' } +BioGenomicRange >> irange [ + + ^ irange +] + +{ #category : 'accessing' } +BioGenomicRange >> irange: anObject [ + + irange := anObject +] + +{ #category : 'accessing' } +BioGenomicRange >> metadata [ + ^ metadata ifNil: [ metadata := Dictionary new ] +] + +{ #category : 'accessing' } +BioGenomicRange >> metadata: anObject [ + + metadata := anObject +] + +{ #category : 'testing' } +BioGenomicRange >> overlaps: anotherGenomicRange ignoreStrand: aBoolean [ + + seqname asString ~= anotherGenomicRange seqname asString ifTrue: [ + ^ false ]. + (aBoolean not and: [ + self strand symbol ~= #* and: [ + anotherGenomicRange strand symbol ~= #* and: [ + self strand symbol ~= anotherGenomicRange strand symbol ] ] ]) + ifTrue: [ ^ false ]. + ^ self start <= anotherGenomicRange end and: [ + anotherGenomicRange start <= self end ] +] + +{ #category : 'printing' } +BioGenomicRange >> printOn: aStream [ + + aStream + nextPutAll: seqname asString; + nextPutAll: ':'; + nextPutAll: self start asString; + nextPutAll: '-'; + nextPutAll: self end asString; + nextPutAll: '('; + nextPutAll: self strand symbol asString; + nextPutAll: ')' +] + +{ #category : 'accessing' } +BioGenomicRange >> seqname [ + + ^ seqname +] + +{ #category : 'accessing' } +BioGenomicRange >> seqname: anObject [ + + seqname := anObject +] + +{ #category : 'accessing' } +BioGenomicRange >> start [ + ^ irange startAt: 1 +] + +{ #category : 'accessing' } +BioGenomicRange >> strand [ + ^ strand ifNil: [ BioStrand unknown ] +] + +{ #category : 'accessing' } +BioGenomicRange >> strand: anObject [ + + strand := anObject +] + +{ #category : 'accessing' } +BioGenomicRange >> width [ + ^ irange widthAt: 1 +] diff --git a/repository/BioTools/BioGenomicRanges.class.st b/repository/BioTools/BioGenomicRanges.class.st index b69d4346..1cc635d9 100644 --- a/repository/BioTools/BioGenomicRanges.class.st +++ b/repository/BioTools/BioGenomicRanges.class.st @@ -1,31 +1,590 @@ -" -A genomic range represents a Collection of genomic locations (regions or intervals) and associated annotations, enabling to attach chromosome coordinates, sequence name, and a strand. +Class { + #name : 'BioGenomicRanges', + #superclass : 'BioObject', + #instVars : [ + 'seqnames', + 'ranges', + 'strands', + 'metadata', + 'seqinfo', + 'ignoreStrandFlag' + ], + #category : 'BioTools-Genomic-Ranges', + #package : 'BioTools', + #tag : 'Genomic-Ranges' +} -- Each genomic range is described by --- A chromosome name, --- A start --- An end --- A strand. -- start and end are both considered included into the interval and represents 1-based positions relative to the 5’ end of the plus strand of the chromosome, even when the range is on the minus strand. +{ #category : 'examples' } +BioGenomicRanges class >> example01Basic [ + + | gr gr2 hits reduced bed gff df | + "Create GRanges-like object" + gr := self + seqnames: #( 'chr1' 'chr1' 'chr2' ) + starts: #( 1 10 5 ) + ends: #( 5 20 8 ) + strands: #( '+' '-' '*' ) + metadata: (Dictionary new + at: #gene put: #( 'A' 'B' 'C' ); + yourself). + "Shift and reduce" + gr2 := gr + 2. + reduced := gr2 reduce. -" -Class { - #name : #BioGenomicRanges, - #superclass : #BioNamedObject, - #category : #'BioTools-Biological' -} + "Overlap queries" + hits := gr findOverlaps: gr2. + + "Export" + bed := gr asBEDString. + gff := gr asGFFString. + df := gr asDataFrame. + + { + (#original -> gr). + (#shifted -> gr2). + (#reduced -> reduced). + (#hits -> hits). + (#bed -> bed). + (#gff -> gff). + (#dataFrame -> df) } inspect +] + +{ #category : 'examples' } +BioGenomicRanges class >> example02Basic [ + + + | gr gr2 overlaps inter unioned bed gff | + gr := BioGenomicRanges + seqnames: #( 'chr1' 'chr1' 'chr2' ) + starts: #( 1 10 5 ) + ends: #( 5 20 8 ) + strands: #( '+' '-' '*' ) + metadata: (Dictionary new + at: #gene put: #( 'A' 'B' 'C' ); + yourself). + + gr2 := BioGenomicRanges + seqnames: #( 'chr1' 'chr2' ) + starts: #( 4 1 ) + ends: #( 12 6 ) + strands: #( '+' '*' ) + metadata: Dictionary new. + + overlaps := gr findOverlaps: gr2. + + inter := gr intersect: gr2. + unioned := gr union: gr2. + + bed := gr asBEDString. + gff := gr asGFFString. + + { + (#gr -> gr). + (#gr2 -> gr2). + (#overlaps -> overlaps). + (#intersection -> inter). + (#union -> unioned). + (#bed -> bed). + (#gff -> gff). + (#dataFrame -> gr asDataFrame) } inspect +] + +{ #category : 'instance creation' } +BioGenomicRanges class >> fromBED: aString [ + | lines seq starts ends strands names scores | + lines := (aString findTokens: String crlf) reject: [ :ln | ln isEmpty or: [ ln first = $# ] ]. + seq := OrderedCollection new. + starts := OrderedCollection new. + ends := OrderedCollection new. + strands := OrderedCollection new. + names := OrderedCollection new. + scores := OrderedCollection new. + lines do: [ :ln | + | f | + f := ln findTokens: Character tab asString. + f size >= 3 ifFalse: [ self error: 'Invalid BED line: ', ln ]. + seq add: (f at: 1). + "BED start is 0-based half-open; convert to 1-based inclusive" + starts add: ((f at: 2) asInteger + 1). + ends add: ((f at: 3) asInteger). + f size >= 4 ifTrue: [ names add: (f at: 4) ] ifFalse: [ names add: nil ]. + f size >= 5 ifTrue: [ scores add: (f at: 5) ] ifFalse: [ scores add: nil ]. + f size >= 6 ifTrue: [ strands add: (f at: 6) ] ifFalse: [ strands add: '*' ] ]. + ^ self + seqnames: seq + starts: starts + ends: ends + strands: strands + metadata: (Dictionary new + at: #name put: names asArray; + at: #score put: scores asArray; + yourself) -{ #category : #examples } -BioGenomicRanges class >> example01 [ -"GRanges(seqnames=Rle(c('chr1', 'chr2', 'chr3'), c(3, 3, 4)), - IRanges(1:10, width=5), strand='-', - score=101:110, GC = runif(10))" +] + +{ #category : 'instance creation' } +BioGenomicRanges class >> fromDataFrame: aDictionary [ + | seq starts ends strands md | + seq := (aDictionary at: #seqnames ifAbsent: [ aDictionary at: 'seqnames' ]). + starts := (aDictionary at: #start ifAbsent: [ aDictionary at: 'start' ]). + ends := (aDictionary at: #end ifAbsent: [ aDictionary at: 'end' ]). + strands := (aDictionary at: #strand ifAbsent: [ aDictionary at: 'strand' ifAbsent: [ Array new: seq size withAll: '*' ] ]). + md := aDictionary copy. + md removeKey: #seqnames ifAbsent: [ md removeKey: 'seqnames' ifAbsent: [ ] ]. + md removeKey: #start ifAbsent: [ md removeKey: 'start' ifAbsent: [ ] ]. + md removeKey: #end ifAbsent: [ md removeKey: 'end' ifAbsent: [ ] ]. + md removeKey: #strand ifAbsent: [ md removeKey: 'strand' ifAbsent: [ ] ]. + ^ self seqnames: seq starts: starts ends: ends strands: strands metadata: md +] + +{ #category : 'instance creation' } +BioGenomicRanges class >> fromGFF: aString [ + | lines seq starts ends strands type source phase score attr | + lines := (aString findTokens: String crlf) reject: [ :ln | ln isEmpty or: [ ln first = $# ] ]. + seq := OrderedCollection new. + starts := OrderedCollection new. + ends := OrderedCollection new. + strands := OrderedCollection new. + type := OrderedCollection new. + source := OrderedCollection new. + phase := OrderedCollection new. + score := OrderedCollection new. + attr := OrderedCollection new. + lines do: [ :ln | + | f | + f := ln findTokens: Character tab asString. + f size < 9 ifTrue: [ self error: 'Invalid GFF3 line: ', ln ]. + seq add: (f at: 1). + source add: (f at: 2). + type add: (f at: 3). + starts add: (f at: 4) asInteger. + ends add: (f at: 5) asInteger. + score add: (f at: 6). + strands add: (f at: 7). + phase add: (f at: 8). + attr add: (f at: 9) ]. + ^ self + seqnames: seq + starts: starts + ends: ends + strands: strands + metadata: (Dictionary new + at: #source put: source asArray; + at: #type put: type asArray; + at: #score put: score asArray; + at: #phase put: phase asArray; + at: #attributes put: attr asArray; + yourself) +] + +{ #category : 'instance creation' } +BioGenomicRanges class >> newWithSeqnames: seqCollection ranges: aBioIRanges strand: strandCollection [ + ^ self newWithSeqnames: seqCollection ranges: aBioIRanges strand: strandCollection metadata: Dictionary new +] - BioGenomicRanges new - seqNames: (RunArray runs: #('chr1' 'chr2' 'chr3') values: #(3 3 4)); +{ #category : 'instance creation' } +BioGenomicRanges class >> newWithSeqnames: seqCollection ranges: aBioIRanges strand: strandCollection metadata: aDictionary [ + | size strandObjs | + size := seqCollection size. + (size = aBioIRanges size and: [ size = strandCollection size ]) ifFalse: [ + self error: 'All vectors must have same size' ]. + strandObjs := strandCollection collect: [ :s | (s isKindOf: BioStrand) ifTrue: [ s ] ifFalse: [ BioStrand from: s ] ]. + ^ self new + seqnames: seqCollection asArray; + ranges: aBioIRanges; + strands: strandObjs asArray; + metadata: (aDictionary ifNil: [ Dictionary new ]); + seqinfo: Dictionary new; + ignoreStrand: false; yourself - +] + +{ #category : 'instance creation' } +BioGenomicRanges class >> seqnames: seqCollection starts: startCollection ends: endCollection strands: strandCollection metadata: aDictionary [ + | ir | + ir := BioIRanges starts: startCollection ends: endCollection. + ^ self newWithSeqnames: seqCollection ranges: ir strand: strandCollection metadata: aDictionary + +] + +{ #category : 'accessing' } +BioGenomicRanges >> + delta [ + ^ self plus: delta +] + +{ #category : 'accessing' } +BioGenomicRanges >> - delta [ + ^ self plus: delta negated +] + +{ #category : 'accessing' } +BioGenomicRanges >> addMetadata: valueCollection at: aKey [ + (valueCollection size = self size) ifFalse: [ self error: 'Metadata column size mismatch' ]. + self metadata at: aKey put: valueCollection asArray. + ^ self + +] + +{ #category : 'convert' } +BioGenomicRanges >> asBEDString [ + | out | + out := String streamContents: [ :s | + 1 to: self size do: [ :i | + s + nextPutAll: (self seqnames at: i) asString; nextPut: Character tab; + nextPutAll: ((ranges startAt: i) - 1) asString; nextPut: Character tab; + nextPutAll: (ranges endAt: i) asString; nextPut: Character tab; + nextPutAll: ((self metadata at: #name ifAbsent: [ Array new: self size withAll: '.' ]) at: i) asString; nextPut: Character tab; + nextPutAll: ((self metadata at: #score ifAbsent: [ Array new: self size withAll: '0' ]) at: i) asString; nextPut: Character tab; + nextPutAll: (self strand at: i) symbol asString. + i < self size ifTrue: [ s cr ] ] ]. + ^ out +] + +{ #category : 'convert' } +BioGenomicRanges >> asDataFrame [ + | d | + d := Dictionary new. + d at: #seqnames put: self seqnames copy. + d at: #start put: self start copy. + d at: #end put: self end copy. + d at: #strand put: ((self strand collect: [ :st | st symbol asString ]) asArray). + self metadata keysAndValuesDo: [ :k :v | d at: k put: v ]. + ^ d +] + +{ #category : 'convert' } +BioGenomicRanges >> asGFFString [ + | out | + out := String streamContents: [ :s | + 1 to: self size do: [ :i | + s + nextPutAll: (self seqnames at: i) asString; nextPut: Character tab; + nextPutAll: ((self metadata at: #source ifAbsent: [ Array new: self size withAll: '.' ]) at: i) asString; nextPut: Character tab; + nextPutAll: ((self metadata at: #type ifAbsent: [ Array new: self size withAll: 'region' ]) at: i) asString; nextPut: Character tab; + nextPutAll: (ranges startAt: i) asString; nextPut: Character tab; + nextPutAll: (ranges endAt: i) asString; nextPut: Character tab; + nextPutAll: ((self metadata at: #score ifAbsent: [ Array new: self size withAll: '.' ]) at: i) asString; nextPut: Character tab; + nextPutAll: (self strand at: i) symbol asString; nextPut: Character tab; + nextPutAll: ((self metadata at: #phase ifAbsent: [ Array new: self size withAll: '.' ]) at: i) asString; nextPut: Character tab; + nextPutAll: ((self metadata at: #attributes ifAbsent: [ Array new: self size withAll: '.' ]) at: i) asString. + i < self size ifTrue: [ s cr ] ] ]. + ^ out +] + +{ #category : 'accessing' } +BioGenomicRanges >> at: anIndex [ + + | gr md | + md := Dictionary new. + self metadata keysAndValuesDo: [ :k :v | + (v isCollection and: [ v size = self size ]) + ifTrue: [ md at: k put: (v at: anIndex) ] + ifFalse: [ md at: k put: v ] ]. + gr := BioGenomicRange + seqname: (self seqnames at: anIndex) + start: (ranges startAt: anIndex) + end: (ranges endAt: anIndex) + strand: (self strand at: anIndex) symbol asString. + gr metadata: md. + ^ gr +] + +{ #category : 'accessing' } +BioGenomicRanges >> copyWithSeqnames: aCollection [ + aCollection size = self size + ifFalse: [ self error: 'Size mismatch' ]. + ^ self class + newWithSeqnames: aCollection + ranges: ranges + strand: self strand + metadata: self metadata copy +] + +{ #category : 'accessing' } +BioGenomicRanges >> countOverlaps: anotherGR [ + | counts | + counts := Array new: self size withAll: 0. + (self findOverlaps: anotherGR) do: [ :assoc | + counts at: assoc key put: ((counts at: assoc key) + 1) ]. + ^ counts +] + +{ #category : 'accessing' } +BioGenomicRanges >> disjoin [ + "Return sorted non-overlapping atomic intervals per seqname/strand." + + ^ self reduce. + +] + +{ #category : 'accessing' } +BioGenomicRanges >> end [ + ^ ranges end +] + +{ #category : 'accessing' } +BioGenomicRanges >> findOverlaps: anotherGR [ + + | hits ignore | + hits := OrderedCollection new. + ignore := ignoreStrandFlag ifNil: [ false ]. + 1 to: self size do: [ :i | + | a | + a := self at: i. + 1 to: anotherGR size do: [ :j | + | b | + b := anotherGR at: j. + (a overlaps: b ignoreStrand: ignore) ifTrue: [ hits add: i -> j ] ] ]. + ^ hits asArray +] + +{ #category : 'accessing' } +BioGenomicRanges >> flipStrand [ + strands := (self strand collect: [ :s | s flip ]) asArray. + ^ self +] + +{ #category : 'accessing' } +BioGenomicRanges >> ignoreStrand [ + ignoreStrandFlag := true. + ^ self +] + +{ #category : 'accessing' } +BioGenomicRanges >> ignoreStrand: aBoolean [ + ignoreStrandFlag := aBoolean +] + +{ #category : 'accessing' } +BioGenomicRanges >> ignoreStrandFlag [ + + ^ ignoreStrandFlag +] + +{ #category : 'accessing' } +BioGenomicRanges >> ignoreStrandFlag: anObject [ + + ignoreStrandFlag := anObject +] + +{ #category : 'accessing' } +BioGenomicRanges >> intersect [ + "Self-intersection as reduced disjoint pieces that have multiplicity > 1 is not implemented in v1." + ^ self disjoin +] + +{ #category : 'testing' } +BioGenomicRanges >> isEmpty [ + ^ self size = 0 +] + +{ #category : 'accessing' } +BioGenomicRanges >> mcols [ + ^ self metadata +] + +{ #category : 'accessing' } +BioGenomicRanges >> mcols: aDictionary [ + metadata := aDictionary +] + +{ #category : 'accessing' } +BioGenomicRanges >> metadata [ + + ^ metadata ifNil: [ metadata := Dictionary new ] +] + +{ #category : 'accessing' } +BioGenomicRanges >> metadata: anObject [ + + metadata := anObject +] + +{ #category : 'accessing' } +BioGenomicRanges >> overlapWith: anotherGR [ + | hits indices | + hits := self findOverlaps: anotherGR. + indices := (hits collect: [ :assoc | assoc key ]) asSet asOrderedCollection sort. + ^ self subsetAtIndices: indices +] + +{ #category : 'accessing' } +BioGenomicRanges >> plus: delta [ + | newStarts newEnds | + newStarts := self start collect: [ :s | s + delta ]. + newEnds := self end collect: [ :e | e + delta ]. + ^ self class + newWithSeqnames: self seqnames + ranges: (BioIRanges starts: newStarts ends: newEnds) + strand: self strand + metadata: self metadata copy +] + +{ #category : 'printing' } +BioGenomicRanges >> printOn: aStream [ + aStream + nextPutAll: 'BioGenomicRanges('; + nextPutAll: self size asString; + nextPutAll: ' ranges)' +] + +{ #category : 'accessing' } +BioGenomicRanges >> ranges [ + + ^ ranges +] + +{ #category : 'accessing' } +BioGenomicRanges >> ranges: anObject [ + + ranges := anObject +] + +{ #category : 'accessing' } +BioGenomicRanges >> reduce [ + | tuples grouped outSeq outStart outEnd outStrand | + self isEmpty ifTrue: [ ^ self ]. + tuples := OrderedCollection new. + 1 to: self size do: [ :i | + tuples add: { self seqnames at: i . ranges startAt: i . ranges endAt: i . self strand at: i } ]. + grouped := Dictionary new. + tuples do: [ :t | + | key | + key := { t first. (t fourth symbol) }. + (grouped at: key ifAbsentPut: [ OrderedCollection new ]) add: (t second -> t third) ]. + outSeq := OrderedCollection new. + outStart := OrderedCollection new. + outEnd := OrderedCollection new. + outStrand := OrderedCollection new. + grouped keysAndValuesDo: [ :key :intervals | + | sorted curS curE | + sorted := intervals asArray sort: [ :a :b | a key < b key ]. + curS := sorted first key. + curE := sorted first value. + 2 to: sorted size do: [ :i | + | s e | + s := (sorted at: i) key. + e := (sorted at: i) value. + s <= (curE + 1) + ifTrue: [ curE := curE max: e ] + ifFalse: [ + outSeq add: key first. + outStart add: curS. + outEnd add: curE. + outStrand add: (BioStrand from: key second asString). + curS := s. + curE := e ] ]. + outSeq add: key first. + outStart add: curS. + outEnd add: curE. + outStrand add: (BioStrand from: key second asString) ]. + ^ self class + newWithSeqnames: outSeq + ranges: (BioIRanges starts: outStart ends: outEnd) + strand: outStrand + metadata: Dictionary new +] + +{ #category : 'accessing' } +BioGenomicRanges >> reject: aBlock [ + + ^ self select: [ :each | (aBlock value: each) not ] +] + +{ #category : 'accessing' } +BioGenomicRanges >> select: aBlock [ + | idx | + idx := OrderedCollection new. + 1 to: self size do: [ :i | (aBlock value: (self at: i)) ifTrue: [ idx add: i ] ]. + ^ self subsetAtIndices: idx +] + +{ #category : 'accessing' } +BioGenomicRanges >> seqinfo [ + ^ seqinfo ifNil: [ seqinfo := Dictionary new ] +] + +{ #category : 'accessing' } +BioGenomicRanges >> seqinfo: anObject [ + + seqinfo := anObject +] + +{ #category : 'accessing' } +BioGenomicRanges >> seqnames [ + + ^ seqnames ifNil: [ #() ] +] + +{ #category : 'accessing' } +BioGenomicRanges >> seqnames: aCollection [ + seqnames := aCollection asArray +] + +{ #category : 'accessing' } +BioGenomicRanges >> setdiff [ + "Set difference against self is empty. Included for API compatibility." + ^ self class + newWithSeqnames: #() + ranges: (BioIRanges starts: #() ends: #()) + strand: #() + metadata: Dictionary new +] + +{ #category : 'accessing' } +BioGenomicRanges >> size [ + ^ self seqnames size +] + +{ #category : 'accessing' } +BioGenomicRanges >> start [ + ^ ranges start +] + +{ #category : 'accessing' } +BioGenomicRanges >> strand [ + ^ strands ifNil: [ #() ] +] + +{ #category : 'accessing' } +BioGenomicRanges >> strands [ + ^ self strand +] + +{ #category : 'accessing' } +BioGenomicRanges >> strands: aCollection [ + strands := aCollection asArray +] + +{ #category : 'accessing' } +BioGenomicRanges >> subsetAtIndices: indexCollection [ + | newSeq newStarts newEnds newStrands newMd | + newSeq := indexCollection collect: [ :i | self seqnames at: i ]. + newStarts := indexCollection collect: [ :i | ranges startAt: i ]. + newEnds := indexCollection collect: [ :i | ranges endAt: i ]. + newStrands := indexCollection collect: [ :i | (self strand at: i) ]. + newMd := Dictionary new. + self metadata keysAndValuesDo: [ :k :v | + (v isCollection and: [ v size = self size ]) + ifTrue: [ newMd at: k put: (indexCollection collect: [ :i | v at: i ]) asArray ] + ifFalse: [ newMd at: k put: v ] ]. + ^ self class + newWithSeqnames: newSeq + ranges: (BioIRanges starts: newStarts ends: newEnds) + strand: newStrands + metadata: newMd +] + +{ #category : 'accessing' } +BioGenomicRanges >> union [ + "Union within object: concat then reduce." + ^ self reduce +] +{ #category : 'accessing' } +BioGenomicRanges >> width [ + ^ ranges width ] diff --git a/repository/BioTools/BioGenotype.class.st b/repository/BioTools/BioGenotype.class.st index 3c1c893b..61a80020 100644 --- a/repository/BioTools/BioGenotype.class.st +++ b/repository/BioTools/BioGenotype.class.st @@ -14,17 +14,19 @@ Internal Representation and Key Implementation Points. Implementation Points " Class { - #name : #BioGenotype, - #superclass : #BioObject, + #name : 'BioGenotype', + #superclass : 'BioObject', #instVars : [ 'alleleA', 'alleleB', 'locus' ], - #category : #'BioTools-Biological' + #category : 'BioTools-Biological', + #package : 'BioTools', + #tag : 'Biological' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioGenotype class >> withSpacedAlleles: aString [ " Answer a new receiver's instance from aString interpreted as two unspaced alleles, e.g.: 'AC' or 'CT' " @@ -37,43 +39,43 @@ BioGenotype class >> withSpacedAlleles: aString [ ] -{ #category : #comparing } +{ #category : 'comparing' } BioGenotype >> = aNucleotide [ self == aNucleotide ifTrue: [ ^ true ]. ^ self alleleA = aNucleotide and: [ self alleleB = aNucleotide ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioGenotype >> alleleA [ ^ alleleA ] -{ #category : #accessing } +{ #category : 'accessing' } BioGenotype >> alleleA: anObject [ " Set the receiver's first allele " alleleA := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioGenotype >> alleleB [ ^ alleleB ] -{ #category : #accessing } +{ #category : 'accessing' } BioGenotype >> alleleB: anObject [ alleleB := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioGenotype >> end [ " Answer the receiver's end position " ^ self locus end ] -{ #category : #accessing } +{ #category : 'accessing' } BioGenotype >> end: anObject [ " See comment in " @@ -82,14 +84,14 @@ BioGenotype >> end: anObject [ ] -{ #category : #comparing } +{ #category : 'comparing' } BioGenotype >> hash [ "hash is implemented because #= is implemented" ^ self alleleA hash bitXor: self alleleB hash ] -{ #category : #accessing } +{ #category : 'accessing' } BioGenotype >> locus [ " Answer the receiver's " @@ -97,14 +99,14 @@ BioGenotype >> locus [ ifNil: [ locus := BioLocus new ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioGenotype >> locus: aBioLocus [ " Set the receiver's locus to be aBioLocus " locus := aBioLocus ] -{ #category : #printing } +{ #category : 'printing' } BioGenotype >> printOn: aStream [ " Private - See superimplementor's comment " @@ -117,14 +119,14 @@ BioGenotype >> printOn: aStream [ space ] -{ #category : #accessing } +{ #category : 'accessing' } BioGenotype >> start [ " Answer the receiver's " ^ self locus start ] -{ #category : #accessing } +{ #category : 'accessing' } BioGenotype >> start: anObject [ " See comment in " @@ -133,7 +135,7 @@ BioGenotype >> start: anObject [ ] -{ #category : #comparing } +{ #category : 'comparing' } BioGenotype >> ~= aNucleotide [ self == aNucleotide ifTrue: [ ^ false ]. diff --git a/repository/BioTools/BioGenotypeCollection.class.st b/repository/BioTools/BioGenotypeCollection.class.st index 4901a2db..4a2a51c9 100644 --- a/repository/BioTools/BioGenotypeCollection.class.st +++ b/repository/BioTools/BioGenotypeCollection.class.st @@ -5,15 +5,17 @@ It can be instantiated from a given String with alleles separated by spaces, tab " Class { - #name : #BioGenotypeCollection, - #superclass : #BioObject, + #name : 'BioGenotypeCollection', + #superclass : 'BioObject', #instVars : [ 'genotypes' ], - #category : #'BioTools-Biological' + #category : 'BioTools-Biological', + #package : 'BioTools', + #tag : 'Biological' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioGenotypeCollection class >> fromAlleles: aCollection [ " Answer a new instance of the receiver without tokens between each allele, aCollection contains each genotype as a two-sized String : #('CC' 'CC' 'TC' 'TT') " @@ -23,7 +25,7 @@ BioGenotypeCollection class >> fromAlleles: aCollection [ ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioGenotypeCollection class >> fromSpacedAlleles: aString [ " Answer a new instance of the receiver using a space tokenized as input as contents " @@ -32,7 +34,7 @@ BioGenotypeCollection class >> fromSpacedAlleles: aString [ yourself ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioGenotypeCollection class >> fromTabbedAlleles: aString [ " Answer a new instance of the receiver using a space tokenized as input as contents " @@ -41,13 +43,13 @@ BioGenotypeCollection class >> fromTabbedAlleles: aString [ yourself ] -{ #category : #accessing } +{ #category : 'accessing' } BioGenotypeCollection >> collectionClass [ ^ OrderedCollection ] -{ #category : #initialization } +{ #category : 'initialization' } BioGenotypeCollection >> findAllelesFrom: aCollection [ ^ aCollection @@ -55,19 +57,19 @@ BioGenotypeCollection >> findAllelesFrom: aCollection [ thenCollect: [ : genotypeString | BioGenotype withSpacedAlleles: genotypeString ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioGenotypeCollection >> genotypes [ ^ genotypes ifNil: [ genotypes := self collectionClass new ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioGenotypeCollection >> genotypes: anObject [ genotypes := anObject ] -{ #category : #initialization } +{ #category : 'initialization' } BioGenotypeCollection >> initializeFromAlleles: aCollection [ " Private - See class instance creation comment " @@ -75,7 +77,7 @@ BioGenotypeCollection >> initializeFromAlleles: aCollection [ self genotypes addAll: (self findAllelesFrom: aCollection) ] -{ #category : #initialization } +{ #category : 'initialization' } BioGenotypeCollection >> initializeFromAlleles: aString spacing: aCharacter [ " Private - See class instance creation comment " @@ -88,7 +90,7 @@ BioGenotypeCollection >> initializeFromAlleles: aString spacing: aCharacter [ yourself) ] ] -{ #category : #initialization } +{ #category : 'initialization' } BioGenotypeCollection >> initializeFromSpacedAlleles: aString [ " Private - See class instance creation comment " @@ -96,7 +98,7 @@ BioGenotypeCollection >> initializeFromSpacedAlleles: aString [ ] -{ #category : #initialization } +{ #category : 'initialization' } BioGenotypeCollection >> initializeFromTabbedAlleles: aString [ " Private - See class instance creation comment " @@ -104,7 +106,7 @@ BioGenotypeCollection >> initializeFromTabbedAlleles: aString [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioGenotypeCollection >> spaceAlleles [ ^ self genotypes collect: [ : geno | diff --git a/repository/BioTools/BioGroupedCollection.class.st b/repository/BioTools/BioGroupedCollection.class.st index 02fc4312..9d17c004 100644 --- a/repository/BioTools/BioGroupedCollection.class.st +++ b/repository/BioTools/BioGroupedCollection.class.st @@ -1,10 +1,12 @@ Class { - #name : #BioGroupedCollection, - #superclass : #BioOrderedCollection, - #category : 'BioTools-Collections' + #name : 'BioGroupedCollection', + #superclass : 'BioOrderedCollection', + #category : 'BioTools-Collections', + #package : 'BioTools', + #tag : 'Collections' } -{ #category : #converting } +{ #category : 'converting' } BioGroupedCollection >> asString [ ^ self anyOne asString diff --git a/repository/BioTools/BioHTTPClient.class.st b/repository/BioTools/BioHTTPClient.class.st index d1533744..1bb43d66 100644 --- a/repository/BioTools/BioHTTPClient.class.st +++ b/repository/BioTools/BioHTTPClient.class.st @@ -1,17 +1,19 @@ Class { - #name : #BioHTTPClient, - #superclass : #BioWebClientEngine, - #category : 'BioTools-Adapters' + #name : 'BioHTTPClient', + #superclass : 'BioWebClientEngine', + #category : 'BioTools-Adapters', + #package : 'BioTools', + #tag : 'Adapters' } -{ #category : #accessing } +{ #category : 'accessing' } BioHTTPClient class >> providerClass [ " See superimplementor's comment " ^ #HTTPClient ] -{ #category : #accessing } +{ #category : 'accessing' } BioHTTPClient >> decode: aString [ " See superimplementor's comment " @@ -19,7 +21,7 @@ BioHTTPClient >> decode: aString [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioHTTPClient >> downloadUrl [ " See superimplementor's comment " diff --git a/repository/BioTools/BioINSDCCollection.class.st b/repository/BioTools/BioINSDCCollection.class.st index 0984090f..83787f77 100644 --- a/repository/BioTools/BioINSDCCollection.class.st +++ b/repository/BioTools/BioINSDCCollection.class.st @@ -3,12 +3,14 @@ Includes The DDBJ/EMBL/GenBank Feature Table definitions " Class { - #name : #BioINSDCCollection, - #superclass : #BioReadersCollection, - #category : #'BioTools-Collections' + #name : 'BioINSDCCollection', + #superclass : 'BioReadersCollection', + #category : 'BioTools-Collections', + #package : 'BioTools', + #tag : 'Collections' } -{ #category : #accessing } +{ #category : 'accessing' } BioINSDCCollection class >> qualifierForDBXRef [ " Database cross-reference: pointer to related information in another database. Details : http://www.ebi.ac.uk/ena/WebFeat/qualifiers/db_xref.html " @@ -16,7 +18,7 @@ BioINSDCCollection class >> qualifierForDBXRef [ ^ 'db_xref' ] -{ #category : #accessing } +{ #category : 'accessing' } BioINSDCCollection class >> qualifierForIsolate [ " individual isolate from which the sequence was obtained Details : http://www.insdc.org/files/feature_table.html " @@ -24,7 +26,7 @@ BioINSDCCollection class >> qualifierForIsolate [ ^ 'isolate' ] -{ #category : #accessing } +{ #category : 'accessing' } BioINSDCCollection class >> qualifierForMolType [ " in vivo molecule type of sequence Details : http://www.insdc.org/files/feature_table.html " @@ -32,7 +34,7 @@ BioINSDCCollection class >> qualifierForMolType [ ^ 'mol_type' ] -{ #category : #accessing } +{ #category : 'accessing' } BioINSDCCollection class >> qualifierForOrganelle [ " type of membrane-bound intracellular structure from which the sequence was obtained Details : http://www.insdc.org/files/feature_table.html " @@ -40,7 +42,7 @@ BioINSDCCollection class >> qualifierForOrganelle [ ^ 'organelle' ] -{ #category : #accessing } +{ #category : 'accessing' } BioINSDCCollection class >> qualifierForOrganism [ " scientific name of the organism that provided the sequenced genetic material Details : http://www.insdc.org/files/feature_table.html " diff --git a/repository/BioTools/BioIRanges.class.st b/repository/BioTools/BioIRanges.class.st new file mode 100644 index 00000000..6ce6abdc --- /dev/null +++ b/repository/BioTools/BioIRanges.class.st @@ -0,0 +1,150 @@ +Class { + #name : 'BioIRanges', + #superclass : 'BioObject', + #instVars : [ + 'starts', + 'ends', + 'names' + ], + #category : 'BioTools-Genomic-Ranges', + #package : 'BioTools', + #tag : 'Genomic-Ranges' +} + +{ #category : 'instance creation' } +BioIRanges class >> starts: startCollection ends: endCollection [ + "Create an IRanges-like vector object from start/end collections." + ^ self new + starts: startCollection asArray; + ends: endCollection asArray; + yourself + +] + +{ #category : 'instance creation' } +BioIRanges class >> starts: startCollection widths: widthCollection [ + "Create IRanges from starts and widths (inclusive coordinates)." + | starts widths ends | + starts := startCollection asArray. + widths := widthCollection asArray. + (starts size = widths size) ifFalse: [ self error: 'Starts and widths must have same size' ]. + ends := Array new: starts size. + 1 to: starts size do: [ :i | + (widths at: i) < 0 ifTrue: [ self error: 'Width cannot be negative' ]. + ends at: i put: ((starts at: i) + (widths at: i) - 1) ]. + ^ self starts: starts ends: ends +] + +{ #category : 'accessing' } +BioIRanges >> at: anIndex [ + "Return a single-range IRanges." + ^ BioIRanges + starts: { self startAt: anIndex } + ends: { self endAt: anIndex } +] + +{ #category : 'accessing' } +BioIRanges >> copyWithStarts: newStarts ends: newEnds [ + ^ self class starts: newStarts ends: newEnds +] + +{ #category : 'accessing' } +BioIRanges >> end [ + ^ self ends +] + +{ #category : 'accessing' } +BioIRanges >> endAt: anIndex [ + ^ ends at: anIndex +] + +{ #category : 'accessing' } +BioIRanges >> ends [ + ^ ends ifNil: [ #() ] + +] + +{ #category : 'accessing' } +BioIRanges >> ends: aCollection [ + | arr | + arr := aCollection asArray. + (starts notNil and: [ starts size ~= arr size ]) ifTrue: [ + self error: 'Starts and ends must have same size' ]. + 1 to: arr size do: [ :i | + ((arr at: i) < (starts at: i)) ifTrue: [ self error: 'End cannot be less than start' ] ]. + ends := arr +] + +{ #category : 'accessing' } +BioIRanges >> isEmpty [ + ^ self size = 0 +] + +{ #category : 'accessing' } +BioIRanges >> names [ + ^ names ifNil: [ #() ] + +] + +{ #category : 'accessing' } +BioIRanges >> names: aCollection [ + (aCollection size = self size) ifFalse: [ self error: 'Names must match size' ]. + names := aCollection asArray +] + +{ #category : 'printing' } +BioIRanges >> printOn: aStream [ + aStream + nextPutAll: 'BioIRanges('; + nextPutAll: self size asString; + nextPutAll: ' ranges)' +] + +{ #category : 'accessing' } +BioIRanges >> select: aBlock [ + + | idx selectedStarts selectedEnds | + idx := OrderedCollection new. + 1 to: self size do: [ :i | (aBlock value: i) ifTrue: [ idx add: i ] ]. + selectedStarts := idx collect: [ :i | self startAt: i ]. + selectedEnds := idx collect: [ :i | self endAt: i ]. + ^ self class starts: selectedStarts ends: selectedEnds +] + +{ #category : 'accessing' } +BioIRanges >> size [ + ^ self starts size +] + +{ #category : 'accessing' } +BioIRanges >> start [ + ^ self starts +] + +{ #category : 'accessing' } +BioIRanges >> startAt: anIndex [ + ^ starts at: anIndex +] + +{ #category : 'accessing' } +BioIRanges >> starts [ + ^ starts ifNil: [ #() ] +] + +{ #category : 'accessing' } +BioIRanges >> starts: aCollection [ + starts := aCollection asArray +] + +{ #category : 'accessing' } +BioIRanges >> width [ + | out | + out := Array new: self size. + 1 to: self size do: [ :i | out at: i put: (self widthAt: i) ]. + ^ out +] + +{ #category : 'accessing' } +BioIRanges >> widthAt: anIndex [ + ^ (self endAt: anIndex) - (self startAt: anIndex) + 1 +] diff --git a/repository/BioTools/BioISAGPanel.class.st b/repository/BioTools/BioISAGPanel.class.st index 66977e81..eb4a87f9 100644 --- a/repository/BioTools/BioISAGPanel.class.st +++ b/repository/BioTools/BioISAGPanel.class.st @@ -8,12 +8,14 @@ BioISAGPanel markersForCattle. BioISAGPanel markersForCattle. " Class { - #name : #BioISAGPanel, - #superclass : #BioPanel, - #category : #'BioTools-Repeats' + #name : 'BioISAGPanel', + #superclass : 'BioPanel', + #category : 'BioTools-Repeats', + #package : 'BioTools', + #tag : 'Repeats' } -{ #category : #'accessing - cattle' } +{ #category : 'accessing - cattle' } BioISAGPanel class >> markerAlleleRangesForCattle [ ^ #( @@ -34,7 +36,7 @@ BioISAGPanel class >> markerAlleleRangesForCattle [ ) ] -{ #category : #'accessing - dog' } +{ #category : 'accessing - dog' } BioISAGPanel class >> markerAlleleRangesForDog [ ^ #( @@ -69,7 +71,7 @@ BioISAGPanel class >> markerAlleleRangesForDog [ ] -{ #category : #'accessing - goat' } +{ #category : 'accessing - goat' } BioISAGPanel class >> markerAlleleRangesForGoat [ ^ #( @@ -95,7 +97,7 @@ BioISAGPanel class >> markerAlleleRangesForGoat [ ) ] -{ #category : #'accessing - pig' } +{ #category : 'accessing - pig' } BioISAGPanel class >> markerAlleleRangesForPig [ ^ #( @@ -119,7 +121,7 @@ BioISAGPanel class >> markerAlleleRangesForPig [ ) ] -{ #category : #'accessing - sheep' } +{ #category : 'accessing - sheep' } BioISAGPanel class >> markerAlleleRangesForSheep [ ^ #( @@ -147,7 +149,7 @@ BioISAGPanel class >> markerAlleleRangesForSheep [ ) ] -{ #category : #'accessing - cattle' } +{ #category : 'accessing - cattle' } BioISAGPanel class >> markersForCattle [ " Answer a of for the receiver's panel " @@ -159,7 +161,7 @@ BioISAGPanel class >> markersForCattle [ yourself ] ] -{ #category : #'accessing - dog' } +{ #category : 'accessing - dog' } BioISAGPanel class >> markersForDog [ " Answer a of for the receiver's panel " @@ -171,7 +173,7 @@ BioISAGPanel class >> markersForDog [ yourself ] ] -{ #category : #'accessing - goat' } +{ #category : 'accessing - goat' } BioISAGPanel class >> markersForGoat [ " Answer a of for the receiver's panel " @@ -183,7 +185,7 @@ BioISAGPanel class >> markersForGoat [ yourself ] ] -{ #category : #'accessing - pig' } +{ #category : 'accessing - pig' } BioISAGPanel class >> markersForPig [ " Answer a of for the receiver's panel " @@ -195,7 +197,7 @@ BioISAGPanel class >> markersForPig [ yourself ] ] -{ #category : #'accessing - sheep' } +{ #category : 'accessing - sheep' } BioISAGPanel class >> markersForSheep [ " Answer a of for the receiver's panel " @@ -207,7 +209,7 @@ BioISAGPanel class >> markersForSheep [ yourself ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioISAGPanel class >> markersForSpecies [ " Answer a of for the receiver's panel " @@ -220,21 +222,21 @@ BioISAGPanel class >> markersForSpecies [ yourself ] -{ #category : #accessing } +{ #category : 'accessing' } BioISAGPanel class >> markersForSpecies: aString [ " Answer a of for the receiver's panel " ^ self markersForSpecies at: aString ] -{ #category : #accessing } +{ #category : 'accessing' } BioISAGPanel class >> panelName [ " Private - See superimplementor's comment " ^ 'ISAG' ] -{ #category : #'accessing - cattle' } +{ #category : 'accessing - cattle' } BioISAGPanel class >> populatePanelForCattle [ self table @@ -242,7 +244,7 @@ BioISAGPanel class >> populatePanelForCattle [ put: self markersForCattle ] -{ #category : #accessing } +{ #category : 'accessing' } BioISAGPanel class >> populatePanelForDog [ self table @@ -250,7 +252,7 @@ BioISAGPanel class >> populatePanelForDog [ put: self markersForDog ] -{ #category : #accessing } +{ #category : 'accessing' } BioISAGPanel class >> populatePanelForGoats [ self table @@ -258,7 +260,7 @@ BioISAGPanel class >> populatePanelForGoats [ put: self markersForGoats ] -{ #category : #accessing } +{ #category : 'accessing' } BioISAGPanel class >> populatePanelForPigs [ self table @@ -266,7 +268,7 @@ BioISAGPanel class >> populatePanelForPigs [ put: self markersForPigs ] -{ #category : #accessing } +{ #category : 'accessing' } BioISAGPanel class >> populatePanelForSheep [ self table @@ -274,7 +276,7 @@ BioISAGPanel class >> populatePanelForSheep [ put: self markersForSheep ] -{ #category : #accessing } +{ #category : 'accessing' } BioISAGPanel class >> populatePanels [ self @@ -283,7 +285,7 @@ BioISAGPanel class >> populatePanels [ yourself ] -{ #category : #accessing } +{ #category : 'accessing' } BioISAGPanel class >> supportedMarkerTypes [ " Answer a of supported types of markers " diff --git a/repository/BioTools/BioIUPACAlphabet.class.st b/repository/BioTools/BioIUPACAlphabet.class.st index 12a8dd2a..8ede2457 100644 --- a/repository/BioTools/BioIUPACAlphabet.class.st +++ b/repository/BioTools/BioIUPACAlphabet.class.st @@ -7,25 +7,27 @@ See subclasses for details. " Class { - #name : #BioIUPACAlphabet, - #superclass : #BioComplementaryAlphabet, + #name : 'BioIUPACAlphabet', + #superclass : 'BioComplementaryAlphabet', #classVars : [ 'OneLetterAminoacidNames', 'OneLetterNucleotideNames', 'ThreeLetterAminoacidNames', 'ThreeLetterNucleotideNames' ], - #category : #'BioTools-Alphabets' + #category : 'BioTools-Alphabets', + #package : 'BioTools', + #tag : 'Alphabets' } -{ #category : #accessing } +{ #category : 'accessing' } BioIUPACAlphabet class >> ambiguousAlphabets [ " Answer a with the ambiguous alphabet subclasses " ^ self allSubclasses select: #isAmbiguousAlphabet ] -{ #category : #'class initialization' } +{ #category : 'class initialization' } BioIUPACAlphabet class >> initialize [ " Private - See superimplementor's comment " @@ -36,7 +38,7 @@ BioIUPACAlphabet class >> initialize [ ThreeLetterNucleotideNames := self initializeThreeLetterNucleotideNames. ] -{ #category : #'initialize-release' } +{ #category : 'initialize-release' } BioIUPACAlphabet class >> initializeOneLetterAminoacidNames [ " Private - Answer the one letter mapping from Characters to aminoacid names. " @@ -65,7 +67,7 @@ BioIUPACAlphabet class >> initializeOneLetterAminoacidNames [ yourself ] -{ #category : #'initialize-release' } +{ #category : 'initialize-release' } BioIUPACAlphabet class >> initializeOneLetterNucleotideNames [ " Private - Answer the one letter mapping from Characters to aminoacid names. @@ -99,7 +101,7 @@ BioIUPACAlphabet class >> initializeOneLetterNucleotideNames [ yourself ] -{ #category : #'initialize-release' } +{ #category : 'initialize-release' } BioIUPACAlphabet class >> initializeThreeLetterAminoacidNames [ @@ -127,7 +129,7 @@ BioIUPACAlphabet class >> initializeThreeLetterAminoacidNames [ yourself ] -{ #category : #'initialize-release' } +{ #category : 'initialize-release' } BioIUPACAlphabet class >> initializeThreeLetterNucleotideNames [ ^ Dictionary new @@ -138,13 +140,13 @@ BioIUPACAlphabet class >> initializeThreeLetterNucleotideNames [ yourself ] -{ #category : #testing } +{ #category : 'testing' } BioIUPACAlphabet class >> isAmbiguousAlphabet [ ^ false ] -{ #category : #accessing } +{ #category : 'accessing' } BioIUPACAlphabet class >> oneLetterAminoacidNames [ @@ -153,25 +155,25 @@ BioIUPACAlphabet class >> oneLetterAminoacidNames [ OneLetterAminoacidNames ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioIUPACAlphabet class >> oneLetterAminoacidNames: anObject [ OneLetterAminoacidNames := anObject ] -{ #category : #'initialize-release' } +{ #category : 'initialize-release' } BioIUPACAlphabet class >> oneLetterNucleotideNames [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioIUPACAlphabet class >> oneLetterNucleotideNames: anObject [ OneLetterNucleotideNames := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioIUPACAlphabet class >> threeLetterAminoacidNames [ @@ -180,31 +182,31 @@ BioIUPACAlphabet class >> threeLetterAminoacidNames [ ThreeLetterAminoacidNames ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioIUPACAlphabet class >> threeLetterAminoacidNames: anObject [ ThreeLetterAminoacidNames := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioIUPACAlphabet class >> threeLetterNucleotideNames [ ^ ThreeLetterNucleotideNames ] -{ #category : #accessing } +{ #category : 'accessing' } BioIUPACAlphabet class >> threeLetterNucleotideNames: anObject [ ThreeLetterNucleotideNames := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioIUPACAlphabet class >> unambiguousAlphabets [ " Answer a with the unambiguous alphabet subclasses " ^ self allSubclasses reject: #isAmbiguousAlphabet ] -{ #category : #printing } +{ #category : 'printing' } BioIUPACAlphabet >> printOn: aStream [ " See superimplementor's comment " diff --git a/repository/BioTools/BioIUPACAmbiguousDNA.class.st b/repository/BioTools/BioIUPACAmbiguousDNA.class.st index 62a8b4d4..bcb87f18 100644 --- a/repository/BioTools/BioIUPACAmbiguousDNA.class.st +++ b/repository/BioTools/BioIUPACAmbiguousDNA.class.st @@ -1,17 +1,19 @@ Class { - #name : #BioIUPACAmbiguousDNA, - #superclass : #BioIUPACUnambiguousDNA, - #category : #'BioTools-Alphabets' + #name : 'BioIUPACAmbiguousDNA', + #superclass : 'BioIUPACUnambiguousDNA', + #category : 'BioTools-Alphabets', + #package : 'BioTools', + #tag : 'Alphabets' } -{ #category : #accessing } +{ #category : 'accessing' } BioIUPACAmbiguousDNA class >> ambiguityCodes [ " Answer a with both two and three ambiguity letters. Do not answer lowercase versions " ^ 'WSMKRYBDHVN' ] -{ #category : #accessing } +{ #category : 'accessing' } BioIUPACAmbiguousDNA class >> ambiguousLettersMap [ " Answer a with mappings between ambiguity codes. Note ambiguity codes could appear as: [AT] @@ -60,14 +62,14 @@ BioIUPACAmbiguousDNA class >> ambiguousLettersMap [ yourself ] -{ #category : #accessing } +{ #category : 'accessing' } BioIUPACAmbiguousDNA class >> codes [ "Answer a with all the receiver's letters, including both two and three ambiguity letters." ^ 'ACGTWSMKRYBDHVN' ] -{ #category : #accessing } +{ #category : 'accessing' } BioIUPACAmbiguousDNA class >> complementaryCases [ " Private - Uppercase and lowercase versions are included to preserve the case, which avoids case conversion and could be useful to distinguish sequence regions " @@ -75,26 +77,26 @@ BioIUPACAmbiguousDNA class >> complementaryCases [ ^ #($A $T $T $A $C $G $G $C $M $K $R $Y $W $W $S $S $Y $R $K $M $V $B $H $D $D $H $B $V $X $X $N $N $a $t $t $a $c $g $g $c $m $k $r $y $w $w $s $s $y $r $k $m $v $b $h $d $d $h $b $v $x $x $n $n $- $- $ $ ) ] -{ #category : #testing } +{ #category : 'testing' } BioIUPACAmbiguousDNA class >> isAmbiguousAlphabet [ " See superimplementor's comment " ^ true ] -{ #category : #accessing } +{ #category : 'accessing' } BioIUPACAmbiguousDNA class >> threeLetterAmbiguityCodes [ ^ 'HBVD' ] -{ #category : #accessing } +{ #category : 'accessing' } BioIUPACAmbiguousDNA class >> twoLetterAmbiguityCodes [ ^ 'YRSWKM' ] -{ #category : #printing } +{ #category : 'printing' } BioIUPACAmbiguousDNA >> printOn: aStream [ " See superimplementor's comment " diff --git a/repository/BioTools/BioIUPACAmbiguousRNA.class.st b/repository/BioTools/BioIUPACAmbiguousRNA.class.st index 57b88afd..4b890665 100644 --- a/repository/BioTools/BioIUPACAmbiguousRNA.class.st +++ b/repository/BioTools/BioIUPACAmbiguousRNA.class.st @@ -4,39 +4,41 @@ See class side for implementation details. " Class { - #name : #BioIUPACAmbiguousRNA, - #superclass : #BioIUPACRNA, - #category : #'BioTools-Alphabets' + #name : 'BioIUPACAmbiguousRNA', + #superclass : 'BioIUPACRNA', + #category : 'BioTools-Alphabets', + #package : 'BioTools', + #tag : 'Alphabets' } -{ #category : #accessing } +{ #category : 'accessing' } BioIUPACAmbiguousRNA class >> ambiguityCodes [ " Do not answer lowercase versions " ^ 'RYWSMKHBVDN' ] -{ #category : #accessing } +{ #category : 'accessing' } BioIUPACAmbiguousRNA class >> codes [ ^ 'GAUCRYWSMKHBVDN' ] -{ #category : #accessing } +{ #category : 'accessing' } BioIUPACAmbiguousRNA class >> complementaryCases [ ^ #($a $u $u $a $c $g $g $c $m $k $r $y $w $w $s $s $y $r $k $m $v $b $h $d $d $h $b $v $x $x $n $n) ] -{ #category : #testing } +{ #category : 'testing' } BioIUPACAmbiguousRNA class >> isAmbiguousAlphabet [ " See superimplementor's comment " ^ true ] -{ #category : #printing } +{ #category : 'printing' } BioIUPACAmbiguousRNA >> printOn: aStream [ " See superimplementor's comment " diff --git a/repository/BioTools/BioIUPACDNA.class.st b/repository/BioTools/BioIUPACDNA.class.st index ef5dee1a..e120878c 100644 --- a/repository/BioTools/BioIUPACDNA.class.st +++ b/repository/BioTools/BioIUPACDNA.class.st @@ -1,24 +1,26 @@ Class { - #name : #BioIUPACDNA, - #superclass : #BioIUPACAlphabet, - #category : 'BioTools-Alphabets' + #name : 'BioIUPACDNA', + #superclass : 'BioIUPACAlphabet', + #category : 'BioTools-Alphabets', + #package : 'BioTools', + #tag : 'Alphabets' } -{ #category : #accessing } +{ #category : 'accessing' } BioIUPACDNA >> codonTable [ " Answer the appropriate BioCodonTable for the receiver " ^ BioDNACodonTables ] -{ #category : #testing } +{ #category : 'testing' } BioIUPACDNA >> isDNA [ " Private - See superimplementor's comment " ^ true ] -{ #category : #printing } +{ #category : 'printing' } BioIUPACDNA >> printOn: aStream [ " See superimplementor's comment " diff --git a/repository/BioTools/BioIUPACDNAExtended.class.st b/repository/BioTools/BioIUPACDNAExtended.class.st index 54b8783e..c9e47e95 100644 --- a/repository/BioTools/BioIUPACDNAExtended.class.st +++ b/repository/BioTools/BioIUPACDNAExtended.class.st @@ -10,19 +10,21 @@ Inspired from IUPACData.py " Class { - #name : #BioIUPACDNAExtended, - #superclass : #BioIUPACDNA, - #category : #'BioTools-Alphabets' + #name : 'BioIUPACDNAExtended', + #superclass : 'BioIUPACDNA', + #category : 'BioTools-Alphabets', + #package : 'BioTools', + #tag : 'Alphabets' } -{ #category : #accessing } +{ #category : 'accessing' } BioIUPACDNAExtended class >> codes [ " See superimplementor's comment " ^ 'GATCBDSW' ] -{ #category : #printing } +{ #category : 'printing' } BioIUPACDNAExtended >> printOn: aStream [ " See superimplementor's comment " diff --git a/repository/BioTools/BioIUPACProtein.class.st b/repository/BioTools/BioIUPACProtein.class.st index 050303bd..ebd1cc55 100644 --- a/repository/BioTools/BioIUPACProtein.class.st +++ b/repository/BioTools/BioIUPACProtein.class.st @@ -7,49 +7,51 @@ Instance Variables " Class { - #name : #BioIUPACProtein, - #superclass : #BioIUPACAlphabet, + #name : 'BioIUPACProtein', + #superclass : 'BioIUPACAlphabet', #instVars : [ 'stopSymbol' ], - #category : #'BioTools-Alphabets' + #category : 'BioTools-Alphabets', + #package : 'BioTools', + #tag : 'Alphabets' } -{ #category : #accessing } +{ #category : 'accessing' } BioIUPACProtein class >> ambiguityCodes [ " Do not answer lowercase versions " ^ '-X' ] -{ #category : #accessing } +{ #category : 'accessing' } BioIUPACProtein class >> codes [ ^ 'ACDEFGHIKLMNPQRSTVWY' ] -{ #category : #testing } +{ #category : 'testing' } BioIUPACProtein >> canTranslate [ " Answer if a sequence can be translated using the receiver " ^ false ] -{ #category : #accessing } +{ #category : 'accessing' } BioIUPACProtein >> complementaryTable [ " Answer the receiver's complementary table " ^ self signalInvalidObject: 'Proteins do not have complements' translated ] -{ #category : #testing } +{ #category : 'testing' } BioIUPACProtein >> isProtein [ " See superimplementor's comment " ^ true ] -{ #category : #printing } +{ #category : 'printing' } BioIUPACProtein >> printOn: aStream [ " See superimplementor's comment " @@ -57,18 +59,18 @@ BioIUPACProtein >> printOn: aStream [ aStream nextPutAll: ' -> Protein' ] -{ #category : #accessing } +{ #category : 'accessing' } BioIUPACProtein >> stopSymbol [ ^ stopSymbol ifNil: [ stopSymbol := $* ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioIUPACProtein >> stopSymbol: anObject [ stopSymbol := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioIUPACProtein >> unknownLetter [ " Answer a with the default letter used when a letter in a position in the sequence is unknown " diff --git a/repository/BioTools/BioIUPACProteinExtended.class.st b/repository/BioTools/BioIUPACProteinExtended.class.st index c9a84a6b..45e64f45 100644 --- a/repository/BioTools/BioIUPACProteinExtended.class.st +++ b/repository/BioTools/BioIUPACProteinExtended.class.st @@ -12,18 +12,20 @@ From IUPACData.py (2011) " Class { - #name : #BioIUPACProteinExtended, - #superclass : #BioIUPACProtein, - #category : #'BioTools-Alphabets' + #name : 'BioIUPACProteinExtended', + #superclass : 'BioIUPACProtein', + #category : 'BioTools-Alphabets', + #package : 'BioTools', + #tag : 'Alphabets' } -{ #category : #accessing } +{ #category : 'accessing' } BioIUPACProteinExtended class >> codes [ ^ 'ACDEFGHIKLMNPQRSTVWYBXZJUO' ] -{ #category : #printing } +{ #category : 'printing' } BioIUPACProteinExtended >> printOn: aStream [ " See superimplementor's comment " diff --git a/repository/BioTools/BioIUPACRNA.class.st b/repository/BioTools/BioIUPACRNA.class.st index 26278b18..93c73585 100644 --- a/repository/BioTools/BioIUPACRNA.class.st +++ b/repository/BioTools/BioIUPACRNA.class.st @@ -4,32 +4,34 @@ See subclasses for specific details. " Class { - #name : #BioIUPACRNA, - #superclass : #BioIUPACAlphabet, - #category : #'BioTools-Alphabets' + #name : 'BioIUPACRNA', + #superclass : 'BioIUPACAlphabet', + #category : 'BioTools-Alphabets', + #package : 'BioTools', + #tag : 'Alphabets' } -{ #category : #accessing } +{ #category : 'accessing' } BioIUPACRNA class >> codes [ ^ String empty ] -{ #category : #accessing } +{ #category : 'accessing' } BioIUPACRNA >> codonTable [ " Answer the appropriate BioCodonTable for the receiver " ^ BioRNACodonTables ] -{ #category : #testing } +{ #category : 'testing' } BioIUPACRNA >> isRNA [ " See superimplementor's comment " ^ true ] -{ #category : #printing } +{ #category : 'printing' } BioIUPACRNA >> printOn: aStream [ " See superimplementor's comment " diff --git a/repository/BioTools/BioIUPACUnambiguousDNA.class.st b/repository/BioTools/BioIUPACUnambiguousDNA.class.st index 67ccdcff..532eea55 100644 --- a/repository/BioTools/BioIUPACUnambiguousDNA.class.st +++ b/repository/BioTools/BioIUPACUnambiguousDNA.class.st @@ -3,25 +3,27 @@ BioIUPACUnambiguousDNA is an Alphabet allowing only the A,T,G,C letters. It incl " Class { - #name : #BioIUPACUnambiguousDNA, - #superclass : #BioIUPACDNA, - #category : #'BioTools-Alphabets' + #name : 'BioIUPACUnambiguousDNA', + #superclass : 'BioIUPACDNA', + #category : 'BioTools-Alphabets', + #package : 'BioTools', + #tag : 'Alphabets' } -{ #category : #accessing } +{ #category : 'accessing' } BioIUPACUnambiguousDNA class >> ambiguityCodes [ " Do not answer lowercase versions " ^ 'N' ] -{ #category : #accessing } +{ #category : 'accessing' } BioIUPACUnambiguousDNA class >> codes [ ^ 'GATCN' ] -{ #category : #accessing } +{ #category : 'accessing' } BioIUPACUnambiguousDNA class >> complementaryCases [ " Private - Uppercase and lowercase versions are included to preserve the case, which avoids case conversion and could be useful to distinguish sequence regions " diff --git a/repository/BioTools/BioIUPACUnambiguousRNA.class.st b/repository/BioTools/BioIUPACUnambiguousRNA.class.st index b2854f37..546fb2ea 100644 --- a/repository/BioTools/BioIUPACUnambiguousRNA.class.st +++ b/repository/BioTools/BioIUPACUnambiguousRNA.class.st @@ -3,32 +3,34 @@ It represents the IUPAC RNA alphabet for unambiguous bases. See class side for implementation details. " Class { - #name : #BioIUPACUnambiguousRNA, - #superclass : #BioIUPACRNA, - #category : #'BioTools-Alphabets' + #name : 'BioIUPACUnambiguousRNA', + #superclass : 'BioIUPACRNA', + #category : 'BioTools-Alphabets', + #package : 'BioTools', + #tag : 'Alphabets' } -{ #category : #accessing } +{ #category : 'accessing' } BioIUPACUnambiguousRNA class >> ambiguityCodes [ " Do not answer lowercase versions " ^ 'N' ] -{ #category : #accessing } +{ #category : 'accessing' } BioIUPACUnambiguousRNA class >> codes [ ^ 'GAUC' ] -{ #category : #accessing } +{ #category : 'accessing' } BioIUPACUnambiguousRNA class >> complementaryCases [ ^ #($a $u $u $a $c $g $g $c) ] -{ #category : #printing } +{ #category : 'printing' } BioIUPACUnambiguousRNA >> printOn: aStream [ " See superimplementor's comment " diff --git a/repository/BioTools/BioInitialResult.class.st b/repository/BioTools/BioInitialResult.class.st index d030a6d8..658157a8 100644 --- a/repository/BioTools/BioInitialResult.class.st +++ b/repository/BioTools/BioInitialResult.class.st @@ -1,30 +1,32 @@ Class { - #name : #BioInitialResult, - #superclass : #BioResultObject, + #name : 'BioInitialResult', + #superclass : 'BioResultObject', #instVars : [ 'client', 'reader' ], - #category : 'BioTools-Query' + #category : 'BioTools-Query', + #package : 'BioTools', + #tag : 'Query' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioInitialResult class >> newFrom: anObject [ ^ self basicNew initializeWith: anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioInitialResult >> client [ ^ client ] -{ #category : #accessing } +{ #category : 'accessing' } BioInitialResult >> client: anObject [ client := anObject ] -{ #category : #'convenience-filesystem' } +{ #category : 'convenience-filesystem' } BioInitialResult >> dumpToFileNamed: fileName [ " Outputs the receiver's contents to a file named fileName " @@ -33,7 +35,7 @@ BioInitialResult >> dumpToFileNamed: fileName [ contents: self reader contents ] -{ #category : #'initialize-release' } +{ #category : 'initialize-release' } BioInitialResult >> initializeWith: aClient [ " Private - Set the receiver's client " @@ -42,14 +44,14 @@ BioInitialResult >> initializeWith: aClient [ ] -{ #category : #private } +{ #category : 'private' } BioInitialResult >> reader [ ^ reader ifNil: [ reader := self readerClass new results: self result ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioInitialResult >> reader: anObject [ reader := anObject diff --git a/repository/BioTools/BioInteractorEngine.class.st b/repository/BioTools/BioInteractorEngine.class.st index 4773ff3f..e2d5c35f 100644 --- a/repository/BioTools/BioInteractorEngine.class.st +++ b/repository/BioTools/BioInteractorEngine.class.st @@ -11,12 +11,14 @@ Depending on your execution environment, you could have different implementation -Squeak uses ""OSProcess"" " Class { - #name : #BioInteractorEngine, - #superclass : #BioAbstractAdapter, - #category : #'BioTools-Adapters' + #name : 'BioInteractorEngine', + #superclass : 'BioAbstractAdapter', + #category : 'BioTools-Adapters', + #package : 'BioTools', + #tag : 'Adapters' } -{ #category : #accessing } +{ #category : 'accessing' } BioInteractorEngine class >> request: aString [ " Request and answer the string the user accepts. Answer an empty string if the user cancels." diff --git a/repository/BioTools/BioKomServer.class.st b/repository/BioTools/BioKomServer.class.st index a54fb9a0..08427469 100644 --- a/repository/BioTools/BioKomServer.class.st +++ b/repository/BioTools/BioKomServer.class.st @@ -10,26 +10,28 @@ to get the contents at an URL: (BioWebClientEngine for: 'http://www.google.com.ar') httpGet " Class { - #name : #BioKomServer, - #superclass : #BioWebServerEngine, - #category : #'BioTools-Adapters' + #name : 'BioKomServer', + #superclass : 'BioWebServerEngine', + #category : 'BioTools-Adapters', + #package : 'BioTools', + #tag : 'Adapters' } -{ #category : #testing } +{ #category : 'testing' } BioKomServer class >> isPreferredAdapter [ " Private - See superimplementor's comment " ^ false ] -{ #category : #accessing } +{ #category : 'accessing' } BioKomServer class >> providerClass [ " See superimplementor's comment " ^ #HttpService ] -{ #category : #accessing } +{ #category : 'accessing' } BioKomServer class >> startWebServer [ " See superimplementor's comment " @@ -44,7 +46,7 @@ BioKomServer class >> startWebServer [ do: [ : ex | self notify: ex messageText ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioKomServer class >> stopWebServer [ " See superimplementor's comment " diff --git a/repository/BioTools/BioLocus.class.st b/repository/BioTools/BioLocus.class.st index d541575a..c49eab57 100644 --- a/repository/BioTools/BioLocus.class.st +++ b/repository/BioTools/BioLocus.class.st @@ -13,8 +13,8 @@ Internal Representation and Key Implementation Points. Implementation Points " Class { - #name : #BioLocus, - #superclass : #BioNamedObject, + #name : 'BioLocus', + #superclass : 'BioNamedObject', #instVars : [ 'start', 'end', @@ -23,10 +23,12 @@ Class { 'chrLocation', 'position' ], - #category : #'BioTools-Biological' + #category : 'BioTools-Biological', + #package : 'BioTools', + #tag : 'Biological' } -{ #category : #examples } +{ #category : 'examples' } BioLocus class >> example01 [ ^ self class new @@ -37,7 +39,7 @@ BioLocus class >> example01 [ ] -{ #category : #converting } +{ #category : 'converting' } BioLocus >> asString [ " Answer a representation of the receiver " @@ -46,59 +48,59 @@ BioLocus >> asString [ self printRangeOn: stream ] ] -{ #category : #'accessing - public' } +{ #category : 'accessing - public' } BioLocus >> chrLocation [ " Answer a with the receiver's chromosome location " ^ chrLocation ] -{ #category : #'accessing - public' } +{ #category : 'accessing - public' } BioLocus >> chrLocation: aString [ " Set the chromosome location of the receiver to be aString " chrLocation := aString ] -{ #category : #accessing } +{ #category : 'accessing' } BioLocus >> end [ " Answer a of the receiver's end " ^ end ] -{ #category : #accessing } +{ #category : 'accessing' } BioLocus >> end: aNumber [ " Set aNumber to the receiver's end " end := aNumber ] -{ #category : #accessing } +{ #category : 'accessing' } BioLocus >> length [ " Answer a of the length of this range " ^ length ] -{ #category : #accessing } +{ #category : 'accessing' } BioLocus >> length: aNumber [ " Set the receiver's length to be aNumber " length := aNumber ] -{ #category : #accessing } +{ #category : 'accessing' } BioLocus >> position [ ^ position ] -{ #category : #accessing } +{ #category : 'accessing' } BioLocus >> position: aNumber [ " Set the receiver's location to aNumber " position := aNumber ] -{ #category : #printing } +{ #category : 'printing' } BioLocus >> printChrOn: aStream [ chrLocation ifNil: [ aStream @@ -110,7 +112,7 @@ BioLocus >> printChrOn: aStream [ nextPutAll: chrLocation asString between: $( and: $) ] ] -{ #category : #printing } +{ #category : 'printing' } BioLocus >> printLengthOn: aStream [ length notNil ifTrue: [ aStream @@ -118,7 +120,7 @@ BioLocus >> printLengthOn: aStream [ nextPutAll: self length asString ] ] -{ #category : #printing } +{ #category : 'printing' } BioLocus >> printNameOn: aStream [ self hasName @@ -132,7 +134,7 @@ BioLocus >> printNameOn: aStream [ nextPutAll: 'Unnamed' between: $[ and: $] ]. ] -{ #category : #printing } +{ #category : 'printing' } BioLocus >> printOn: aStream [ " Private - See superimplementor's comment " @@ -144,7 +146,7 @@ BioLocus >> printOn: aStream [ self printValueOn: aStream ] -{ #category : #printing } +{ #category : 'printing' } BioLocus >> printRangeOn: stream [ (self start notNil and: [ self end notNil ]) @@ -156,7 +158,7 @@ BioLocus >> printRangeOn: stream [ nextPutAll: self end asString ] ] -{ #category : #printing } +{ #category : 'printing' } BioLocus >> printValueOn: aStream [ value notNil ifTrue: [ aStream @@ -164,46 +166,46 @@ BioLocus >> printValueOn: aStream [ nextPutAll: value asString ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioLocus >> range [ " Answer an with the start and end positions of the receiver " ^ self start to: self end ] -{ #category : #testing } +{ #category : 'testing' } BioLocus >> rangeIncludes: aNumber [ "Return true if the number lies in the interval between start and stop." ^ self start notNil and: [ self end notNil and: [ self range rangeIncludes: aNumber ] ] ] -{ #category : #testing } +{ #category : 'testing' } BioLocus >> rangeIncludes: posNumber chrLocation: chrNumber [ "Return true if chrNumber and posNumber lies in the interval between start and stop and chromosomic location ." ^ (self start notNil and: [ self end notNil ]) and: [ self chrLocation = chrNumber and: [ self rangeIncludes: posNumber ] ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioLocus >> start [ " Answer a of the receiver's start " ^ start ] -{ #category : #accessing } +{ #category : 'accessing' } BioLocus >> start: aNumber [ " Set aNumber to the receiver's start " start := aNumber ] -{ #category : #accessing } +{ #category : 'accessing' } BioLocus >> value [ ^ value ] -{ #category : #accessing } +{ #category : 'accessing' } BioLocus >> value: anObject [ value := anObject ] diff --git a/repository/BioTools/BioMaObjectSerializer.class.st b/repository/BioTools/BioMaObjectSerializer.class.st index ef84e6cc..2be63a83 100644 --- a/repository/BioTools/BioMaObjectSerializer.class.st +++ b/repository/BioTools/BioMaObjectSerializer.class.st @@ -14,26 +14,28 @@ to get the contents at an URL: (BioWebClientEngine for: 'http://www.google.com.ar') httpGet " Class { - #name : #BioMaObjectSerializer, - #superclass : #BioSerializationEngine, - #category : #'BioTools-Adapters' + #name : 'BioMaObjectSerializer', + #superclass : 'BioSerializationEngine', + #category : 'BioTools-Adapters', + #package : 'BioTools', + #tag : 'Adapters' } -{ #category : #accessing } +{ #category : 'accessing' } BioMaObjectSerializer class >> providerClass [ " See superimplementor's comment " ^ #MaObjectSerializer ] -{ #category : #'initialize-release' } +{ #category : 'initialize-release' } BioMaObjectSerializer >> initializeWith: aProviderClass [ " Private - See superimplementor's comment " super initializeWith: aProviderClass new ] -{ #category : #accessing } +{ #category : 'accessing' } BioMaObjectSerializer >> materialize [ " See superimplementor comment " @@ -42,7 +44,7 @@ BioMaObjectSerializer >> materialize [ ifFalse: [ self signalInvalidObject: self location , ' is not a valid file for materialization' translated ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioMaObjectSerializer >> serialize: anObject [ " See superimplementor's comment " diff --git a/repository/BioTools/BioMinisatelliteSequence.class.st b/repository/BioTools/BioMinisatelliteSequence.class.st index 7c433c6e..d18a6e66 100644 --- a/repository/BioTools/BioMinisatelliteSequence.class.st +++ b/repository/BioTools/BioMinisatelliteSequence.class.st @@ -13,12 +13,14 @@ Internal Representation and Key Implementation Points. Implementation Points " Class { - #name : #BioMinisatelliteSequence, - #superclass : #BioRepeatSequence, - #category : #'BioTools-Repeats' + #name : 'BioMinisatelliteSequence', + #superclass : 'BioRepeatSequence', + #category : 'BioTools-Repeats', + #package : 'BioTools', + #tag : 'Repeats' } -{ #category : #examples } +{ #category : 'examples' } BioMinisatelliteSequence class >> example01 [ ^ self new @@ -27,21 +29,21 @@ BioMinisatelliteSequence class >> example01 [ yourself. ] -{ #category : #defaults } +{ #category : 'defaults' } BioMinisatelliteSequence >> defaultMaxMotifSize [ " Microsatellite definition at the US National Library of Medicine Medical Subject Headings (MeSH) " ^ 60 ] -{ #category : #defaults } +{ #category : 'defaults' } BioMinisatelliteSequence >> defaultMinMotifSize [ " Microsatellite definition at the US National Library of Medicine Medical Subject Headings (MeSH) " ^ 10 ] -{ #category : #testing } +{ #category : 'testing' } BioMinisatelliteSequence >> isMinisatelliteSequence [ " Answer if the receiver represents a Minisatellite sequence " diff --git a/repository/BioTools/BioMutableSeq.class.st b/repository/BioTools/BioMutableSeq.class.st index 340a6ee1..9f07abe9 100644 --- a/repository/BioTools/BioMutableSeq.class.st +++ b/repository/BioTools/BioMutableSeq.class.st @@ -3,12 +3,14 @@ A mutable sequence which can be modified after creation, it lets you edit the se " Class { - #name : #BioMutableSeq, - #superclass : #BioSequence, - #category : #'BioTools-Sequences' + #name : 'BioMutableSeq', + #superclass : 'BioSequence', + #category : 'BioTools-Sequences', + #package : 'BioTools', + #tag : 'Sequences' } -{ #category : #accessing } +{ #category : 'accessing' } BioMutableSeq >> append: aString [ " This method modifies the receiver. Append aString to the receiver's sequence " @@ -18,7 +20,7 @@ BioMutableSeq >> append: aString [ nextPutAll: aString asString ] ] -{ #category : #converting } +{ #category : 'converting' } BioMutableSeq >> asSequence [ " Answer a copy of the receiver converted to a read-only object " @@ -27,7 +29,7 @@ BioMutableSeq >> asSequence [ alphabet: self alphabet class ] -{ #category : #accessing } +{ #category : 'accessing' } BioMutableSeq >> at: anInteger put: aLetter [ " Store aLetter in the position of the receiver indicated by the anInteger. Answer the receiver " @@ -35,7 +37,7 @@ BioMutableSeq >> at: anInteger put: aLetter [ seq at: anInteger put: aLetter ] -{ #category : #accessing } +{ #category : 'accessing' } BioMutableSeq >> copyReplaceAll: oldSubstring with: newSubstring [ " Refer to comment in Collection>>copyReplaceAll: oldSubstring with: newSubstring " diff --git a/repository/BioTools/BioNCBIUrl2.class.st b/repository/BioTools/BioNCBIUrl2.class.st index 847d822f..081f4564 100644 --- a/repository/BioTools/BioNCBIUrl2.class.st +++ b/repository/BioTools/BioNCBIUrl2.class.st @@ -1,10 +1,12 @@ Class { - #name : #BioNCBIUrl2, - #superclass : #BioUrl, - #category : 'BioTools-Core' + #name : 'BioNCBIUrl2', + #superclass : 'BioUrl', + #category : 'BioTools-Core', + #package : 'BioTools', + #tag : 'Core' } -{ #category : #accessing } +{ #category : 'accessing' } BioNCBIUrl2 >> addParameters: aQueryString [ " Append aQueryString in the receiver's parameters " @@ -12,7 +14,7 @@ BioNCBIUrl2 >> addParameters: aQueryString [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioNCBIUrl2 >> addParameters: aQueryString delimiter: aDelimiterStirng [ " Append aString as the receiver's database name " @@ -22,14 +24,14 @@ BioNCBIUrl2 >> addParameters: aQueryString delimiter: aDelimiterStirng [ self path addLast: queryFragment ] -{ #category : #accessing } +{ #category : 'accessing' } BioNCBIUrl2 >> dbName [ " Answer a String with the receiver's database name, if it was configured " ^self valueForParameter: 'DATABASE' ] -{ #category : #accessing } +{ #category : 'accessing' } BioNCBIUrl2 >> parameters [ " Answer a Collection with the receiver's parameter names " @@ -37,14 +39,14 @@ BioNCBIUrl2 >> parameters [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioNCBIUrl2 >> rid [ " Answer a String with the receiver's RID value, if it was configured " ^ self valueForParameter: 'RID' ] -{ #category : #accessing } +{ #category : 'accessing' } BioNCBIUrl2 >> setParameters: aQueryString [ " Add or modify aQueryString in the receiver's parameters " @@ -63,7 +65,7 @@ BioNCBIUrl2 >> setParameters: aQueryString [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioNCBIUrl2 >> startParameters: aQueryString [ " Add aQueryString as the start parameter in the receiver's parameters " diff --git a/repository/BioTools/BioNamedObject.class.st b/repository/BioTools/BioNamedObject.class.st index 167bd723..2f305ad4 100644 --- a/repository/BioTools/BioNamedObject.class.st +++ b/repository/BioTools/BioNamedObject.class.st @@ -4,15 +4,17 @@ a named object holds a Collection of names. The first name is the preferredName Adding a duplicate name raises an exception. " Class { - #name : #BioNamedObject, - #superclass : #BioVersionedObject, + #name : 'BioNamedObject', + #superclass : 'BioVersionedObject', #instVars : [ 'names' ], - #category : #'BioTools-Core' + #category : 'BioTools-Core', + #package : 'BioTools', + #tag : 'Core' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioNamedObject class >> newNamed: aString [ " Answer a new instance of the receiver named aNameString. " @@ -21,7 +23,7 @@ BioNamedObject class >> newNamed: aString [ yourself ] -{ #category : #accessing } +{ #category : 'accessing' } BioNamedObject class >> uniqueName [ " Answer a intended to represent a unique identifier " @@ -32,14 +34,14 @@ BioNamedObject class >> uniqueName [ ] -{ #category : #comparing } +{ #category : 'comparing' } BioNamedObject >> = anObject [ " Answer whether the receiver and anObject represent the same object. " ^ self == anObject and: [ self class = anObject class and: [ self names = anObject names ] ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioNamedObject >> addName: aString [ " Add aString as a name of the receiver. " @@ -50,7 +52,7 @@ BioNamedObject >> addName: aString [ ifTrue: [ self signalDuplicateObject: aString , ' already exists in the receiver' translated ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioNamedObject >> addUniqueName: aString [ " Add aString as an unique name of the receiver. " @@ -59,7 +61,7 @@ BioNamedObject >> addUniqueName: aString [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioNamedObject >> alphaName [ " Answer the first receiver's name which is alphabetic. If not found answer the receiver's null name " @@ -68,35 +70,35 @@ BioNamedObject >> alphaName [ ifNone: [ self nullName ] ] -{ #category : #testing } +{ #category : 'testing' } BioNamedObject >> hasName [ " Answer if the receiver has any name " ^ (names isNil or: [ self names isEmpty or: [ self names anySatisfy: #isEmpty ] ]) not ] -{ #category : #comparing } +{ #category : 'comparing' } BioNamedObject >> hash [ " hash is implemented because #= is implemented " ^ self names hash ] -{ #category : #testing } +{ #category : 'testing' } BioNamedObject >> includesName: aString [ " Answer if receiver contains aString in any of its names " ^ (self names collect: #asLowercase) includes: aString asLowercase ] -{ #category : #testing } +{ #category : 'testing' } BioNamedObject >> includesNullName [ " Answer if receiver includes a null name " ^ self names includes: self nullName ] -{ #category : #accessing } +{ #category : 'accessing' } BioNamedObject >> name [ " Answer a representing the receiver's preferred name " @@ -105,7 +107,7 @@ BioNamedObject >> name [ ^ self preferredName ] -{ #category : #accessing } +{ #category : 'accessing' } BioNamedObject >> name: aString [ " Set aString to be the preferred name of the receiver. Remove any existing null name. Answer the receiver " @@ -115,14 +117,14 @@ BioNamedObject >> name: aString [ self names addFirst: aString ] -{ #category : #accessing } +{ #category : 'accessing' } BioNamedObject >> nameClass [ " Answer the class used for storing receiver's names " ^ OrderedCollection ] -{ #category : #accessing } +{ #category : 'accessing' } BioNamedObject >> names [ " Answer a of receiver's names " @@ -132,14 +134,14 @@ BioNamedObject >> names [ ifTrue: [ self nameClass with: self nullName ]) ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioNamedObject >> nullName [ " Answer a representing a default name " ^ 'Unnamed ' , self class name ] -{ #category : #accessing } +{ #category : 'accessing' } BioNamedObject >> numericName [ " Answer the first receiver's name which is numeric. If not found answer the receiver's null name " @@ -148,7 +150,7 @@ BioNamedObject >> numericName [ ifNone: [ self nullName ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioNamedObject >> preferredName [ " Answer a String with the receiver's preferred name " @@ -160,14 +162,14 @@ BioNamedObject >> preferredName [ ifFalse: [ names first ] ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioNamedObject >> removeNullName [ " Answer a representing a default name " self names remove: self nullName ifAbsent: [ ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioNamedObject >> uniqueName [ " Answer a intended to represent a unique identifier " diff --git a/repository/BioTools/BioNotFoundObject.class.st b/repository/BioTools/BioNotFoundObject.class.st index d09b3b5c..aea91a5b 100644 --- a/repository/BioTools/BioNotFoundObject.class.st +++ b/repository/BioTools/BioNotFoundObject.class.st @@ -7,12 +7,14 @@ and in the following way: self signalNotFound: 'message' , ex messageText. " Class { - #name : #BioNotFoundObject, - #superclass : #BioException, - #category : #'BioTools-Exceptions' + #name : 'BioNotFoundObject', + #superclass : 'BioException', + #category : 'BioTools-Exceptions', + #package : 'BioTools', + #tag : 'Exceptions' } -{ #category : #accessing } +{ #category : 'accessing' } BioNotFoundObject >> messageText [ ^ String streamContents: [ :stream | diff --git a/repository/BioTools/BioNullAlphabet.class.st b/repository/BioTools/BioNullAlphabet.class.st index 6c38bb20..77c6311b 100644 --- a/repository/BioTools/BioNullAlphabet.class.st +++ b/repository/BioTools/BioNullAlphabet.class.st @@ -3,26 +3,28 @@ A BioNullAlphabet is used when a sequence has no alphabet. " Class { - #name : #BioNullAlphabet, - #superclass : #BioAlphabet, - #category : #'BioTools-Alphabets' + #name : 'BioNullAlphabet', + #superclass : 'BioAlphabet', + #category : 'BioTools-Alphabets', + #package : 'BioTools', + #tag : 'Alphabets' } -{ #category : #accessing } +{ #category : 'accessing' } BioNullAlphabet class >> codes [ " See superimplementor's comment " ^ String empty ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioNullAlphabet class >> for: aString [ " Answer a new instance of the receiver using the sequence aString " ^ (self guessAlphabetFrom: aString) new ] -{ #category : #testing } +{ #category : 'testing' } BioNullAlphabet class >> hasAmbiguousBases: aString [ " See superimplementor's comment " diff --git a/repository/BioTools/BioOSInterfaceEngine.class.st b/repository/BioTools/BioOSInterfaceEngine.class.st index 48903371..ba0dd6ae 100644 --- a/repository/BioTools/BioOSInterfaceEngine.class.st +++ b/repository/BioTools/BioOSInterfaceEngine.class.st @@ -12,19 +12,21 @@ Depending on your execution environment, you could have different implementation " Class { - #name : #BioOSInterfaceEngine, - #superclass : #BioAbstractAdapter, - #category : #'BioTools-Adapters' + #name : 'BioOSInterfaceEngine', + #superclass : 'BioAbstractAdapter', + #category : 'BioTools-Adapters', + #package : 'BioTools', + #tag : 'Adapters' } -{ #category : #accessing } +{ #category : 'accessing' } BioOSInterfaceEngine class >> execNameFor: programName [ " Answer a String with the fully qualified name for programName, i.e. if programName is 'blast' then in Windows family the answer will be 'blast.exe' " ^ self adapterClass execNameFor: programName ] -{ #category : #accessing } +{ #category : 'accessing' } BioOSInterfaceEngine class >> formatPlatformPath: aPath [ " Make necessary transformations on aPath for the current system, e.g. 'C:\Archivos de Programa' -> ""C:\Archivos de Programa"" " @@ -33,14 +35,14 @@ BioOSInterfaceEngine class >> formatPlatformPath: aPath [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioOSInterfaceEngine class >> lineEndConvention [ " Answer #cr, #lf or #crlf with the current's system line end convention " ^ self adapterClass new lineEndConvention ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioOSInterfaceEngine class >> new [ " Answer a new instance of the receiver " @@ -48,7 +50,7 @@ BioOSInterfaceEngine class >> new [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioOSInterfaceEngine >> formatPlatformPath: aPath [ " Private - Given aPath answer a with the path properly formatted for the current platform " @@ -58,7 +60,7 @@ BioOSInterfaceEngine >> formatPlatformPath: aPath [ ] -{ #category : #testing } +{ #category : 'testing' } BioOSInterfaceEngine >> isRunningInMac [ " Answer if the host system is running in Mac OS " @@ -66,7 +68,7 @@ BioOSInterfaceEngine >> isRunningInMac [ ] -{ #category : #testing } +{ #category : 'testing' } BioOSInterfaceEngine >> isRunningInUnix [ " Answer if the host system is running in any Unix-like OS " @@ -74,7 +76,7 @@ BioOSInterfaceEngine >> isRunningInUnix [ ] -{ #category : #testing } +{ #category : 'testing' } BioOSInterfaceEngine >> isRunningInWindows [ " Answer if the host system is running in Microsoft Windows " @@ -82,7 +84,7 @@ BioOSInterfaceEngine >> isRunningInWindows [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioOSInterfaceEngine >> lineEndConvention [ " Answer a #cr, #lf or #crlf with the current's system line end convention " diff --git a/repository/BioTools/BioOSPlatformEngine.class.st b/repository/BioTools/BioOSPlatformEngine.class.st index 530876b7..cf699bdc 100644 --- a/repository/BioTools/BioOSPlatformEngine.class.st +++ b/repository/BioTools/BioOSPlatformEngine.class.st @@ -10,12 +10,14 @@ to get the contents at an URL: (BioWebClientEngine for: 'http://www.google.com.ar') httpGet " Class { - #name : #BioOSPlatformEngine, - #superclass : #BioOSInterfaceEngine, - #category : #'BioTools-Adapters' + #name : 'BioOSPlatformEngine', + #superclass : 'BioOSInterfaceEngine', + #category : 'BioTools-Adapters', + #package : 'BioTools', + #tag : 'Adapters' } -{ #category : #accessing } +{ #category : 'accessing' } BioOSPlatformEngine class >> execNameFor: programName [ " Answer a String with the fully qualified name for programName, i.e. if programName is 'blast' then in Windows family the answer will be 'blast.exe' " @@ -24,35 +26,35 @@ BioOSPlatformEngine class >> execNameFor: programName [ ] -{ #category : #testing } +{ #category : 'testing' } BioOSPlatformEngine class >> isPreferredAdapter [ " Private - See superimplementor's comment " ^ BioObject isRunningInPharo ] -{ #category : #accessing } +{ #category : 'accessing' } BioOSPlatformEngine class >> providerClass [ " See superimplementor's comment " ^ #OSPlatform ] -{ #category : #testing } +{ #category : 'testing' } BioOSPlatformEngine >> isRunningInMac [ " Answer if the host system is running in Mac OS " ^ Smalltalk os isMacOS or: [ Smalltalk os isMacOSX ] ] -{ #category : #testing } +{ #category : 'testing' } BioOSPlatformEngine >> isRunningInUnix [ " Answer if the host system is running in any Unix-like OS " ^ Smalltalk os isUnix ] -{ #category : #testing } +{ #category : 'testing' } BioOSPlatformEngine >> isRunningInWindows [ " Answer if the host system is running in Microsoft Windows " diff --git a/repository/BioTools/BioOSProcessEngine.class.st b/repository/BioTools/BioOSProcessEngine.class.st index 03776373..d1dbaf69 100644 --- a/repository/BioTools/BioOSProcessEngine.class.st +++ b/repository/BioTools/BioOSProcessEngine.class.st @@ -10,12 +10,14 @@ to get the contents at an URL: (BioWebClientEngine for: 'http://www.google.com.ar') httpGet " Class { - #name : #BioOSProcessEngine, - #superclass : #BioOSInterfaceEngine, - #category : #'BioTools-Adapters' + #name : 'BioOSProcessEngine', + #superclass : 'BioOSInterfaceEngine', + #category : 'BioTools-Adapters', + #package : 'BioTools', + #tag : 'Adapters' } -{ #category : #accessing } +{ #category : 'accessing' } BioOSProcessEngine class >> execNameFor: programName [ " Answer a String with the fully qualified name for programName, i.e. if programName is 'blast' then in Windows family the answer will be 'blast.exe' " @@ -23,28 +25,28 @@ BioOSProcessEngine class >> execNameFor: programName [ ] -{ #category : #testing } +{ #category : 'testing' } BioOSProcessEngine class >> isPreferredAdapter [ " Private - See superimplementor's comment " ^ BioObject isRunningInSqueak ] -{ #category : #accessing } +{ #category : 'accessing' } BioOSProcessEngine class >> providerClass [ " See superimplementor's comment " ^ #OSProcess ] -{ #category : #testing } +{ #category : 'testing' } BioOSProcessEngine >> isRunningInMac [ " Answer if the host system is running in Mac OS " ^ self provider isNonUnixMac or: [ self provider isUnixMac ] ] -{ #category : #testing } +{ #category : 'testing' } BioOSProcessEngine >> isRunningInWindows [ " Answer if the host system is running in Microsoft Windows " diff --git a/repository/BioTools/BioOSProcessExecutor.class.st b/repository/BioTools/BioOSProcessExecutor.class.st index 0c158c97..e9912e63 100644 --- a/repository/BioTools/BioOSProcessExecutor.class.st +++ b/repository/BioTools/BioOSProcessExecutor.class.st @@ -5,12 +5,14 @@ See http://wiki.squeak.org/squeak/708 for details " Class { - #name : #BioOSProcessExecutor, - #superclass : #BioExecutionEngine, - #category : #'BioTools-Adapters' + #name : 'BioOSProcessExecutor', + #superclass : 'BioExecutionEngine', + #category : 'BioTools-Adapters', + #package : 'BioTools', + #tag : 'Adapters' } -{ #category : #accessing } +{ #category : 'accessing' } BioOSProcessExecutor class >> executeCommand: aCommandName [ " See superimplementor's comment " @@ -19,7 +21,7 @@ BioOSProcessExecutor class >> executeCommand: aCommandName [ do: [ : ex | ex resume ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioOSProcessExecutor class >> executeCommand: aCommandName parameter: parameterName [ " See superimplementor's comment " @@ -27,7 +29,7 @@ BioOSProcessExecutor class >> executeCommand: aCommandName parameter: parameterN command: aCommandName , String space , parameterName) output. ] -{ #category : #accessing } +{ #category : 'accessing' } BioOSProcessExecutor class >> executeMonitoring: aCommandName [ " See superimplementor's comment " @@ -41,7 +43,7 @@ BioOSProcessExecutor class >> executeMonitoring: aCommandName [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioOSProcessExecutor class >> executeOSProcessCommand: aCommandName [ " Private - Execute aCommandName and answer a with any output returned " @@ -52,14 +54,14 @@ BioOSProcessExecutor class >> executeOSProcessCommand: aCommandName [ ^ osProcess outputAndError ] -{ #category : #testing } +{ #category : 'testing' } BioOSProcessExecutor class >> isPreferredAdapter [ " Private - See superimplementor's comment " ^ self isRunningInUnix ] -{ #category : #accessing } +{ #category : 'accessing' } BioOSProcessExecutor class >> providerClass [ " Private - See superimplementor's comment " diff --git a/repository/BioTools/BioOSSubProcessExecutor.class.st b/repository/BioTools/BioOSSubProcessExecutor.class.st index 1ae8f95d..f080d70f 100644 --- a/repository/BioTools/BioOSSubProcessExecutor.class.st +++ b/repository/BioTools/BioOSSubProcessExecutor.class.st @@ -1,10 +1,12 @@ Class { - #name : #BioOSSubProcessExecutor, - #superclass : #BioExecutionEngine, - #category : #'BioTools-Adapters' + #name : 'BioOSSubProcessExecutor', + #superclass : 'BioExecutionEngine', + #category : 'BioTools-Adapters', + #package : 'BioTools', + #tag : 'Adapters' } -{ #category : #accessing } +{ #category : 'accessing' } BioOSSubProcessExecutor class >> executeCommand: aCommandName [ " See superimplementor's comment " @@ -13,7 +15,7 @@ BioOSSubProcessExecutor class >> executeCommand: aCommandName [ do: [ : ex | ex resume ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioOSSubProcessExecutor class >> executeCommand: aCommandName parameter: parameterName [ "See superimplementor's comment" @@ -24,7 +26,7 @@ BioOSSubProcessExecutor class >> executeCommand: aCommandName parameter: paramet << parameterName trimBoth ]) ] -{ #category : #accessing } +{ #category : 'accessing' } BioOSSubProcessExecutor class >> executeMonitoring: aCommandName [ " See superimplementor's comment " @@ -58,7 +60,7 @@ BioOSSubProcessExecutor class >> executeMonitoring: aCommandName [ ] fork ] -{ #category : #accessing } +{ #category : 'accessing' } BioOSSubProcessExecutor class >> executeOSSubProcessCommand: aCommandName [ " Private - Execute aCommandName and answer a with any output returned " @@ -75,14 +77,14 @@ BioOSSubProcessExecutor class >> executeOSSubProcessCommand: aCommandName [ ^ output trimBoth ] -{ #category : #testing } +{ #category : 'testing' } BioOSSubProcessExecutor class >> isPreferredAdapter [ " Private - See superimplementor's comment " ^ self isRunningInUnix ] -{ #category : #accessing } +{ #category : 'accessing' } BioOSSubProcessExecutor class >> locateProgram: programName [ " Answer a with the full qualified path to programName if can be located by the which command " @@ -92,7 +94,7 @@ BioOSSubProcessExecutor class >> locateProgram: programName [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioOSSubProcessExecutor class >> locateProgramNamed: programName [ "Answer a with the path to programName, if located, or an empty String otherwise" @@ -109,7 +111,7 @@ BioOSSubProcessExecutor class >> locateProgramNamed: programName [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioOSSubProcessExecutor class >> providerClass [ " Private - See superimplementor's comment " diff --git a/repository/BioTools/BioObject.class.st b/repository/BioTools/BioObject.class.st index 2add0dc9..588c3e80 100644 --- a/repository/BioTools/BioObject.class.st +++ b/repository/BioTools/BioObject.class.st @@ -8,46 +8,48 @@ These behaviors are: -Convenience methods for dates " Class { - #name : #BioObject, - #superclass : #Object, - #category : #'BioTools-Core' + #name : 'BioObject', + #superclass : 'Object', + #category : 'BioTools-Core', + #package : 'BioTools', + #tag : 'Core' } -{ #category : #accessing } +{ #category : 'accessing' } BioObject class >> alert: aString [ self inform: aString. ] -{ #category : #'convenience-behavior' } +{ #category : 'convenience-behavior' } BioObject class >> allFinalClasses [ " Answer a with receiver's leaf classes (classes without subclasses) " ^ self allSubclasses select: [ : ea | ea subclasses isEmpty ] ] -{ #category : #'convenience-date' } +{ #category : 'convenience-date' } BioObject class >> currentSeconds [ " Answer a with the number of seconds since 1 January 1901 " ^ self dateClass current asSeconds asString ] -{ #category : #data } +{ #category : 'data' } BioObject class >> dataFilesDirectoryName [ " Answer a of the directory name where the data files are located " ^ 'BioSmalltalkDataFiles' ] -{ #category : #data } +{ #category : 'data' } BioObject class >> dataFilesFullDirectoryName [ " Private - Initialize software items to the receiver's catalog " ^ self workingDirectory asFileReference / self dataFilesDirectoryName ] -{ #category : #'convenience-filesystem' } +{ #category : 'convenience-filesystem' } BioObject class >> dumpToDOSFileNamed: filename contents: anObject [ " Write anObject to a DOS file named filename representing a full path " @@ -58,7 +60,7 @@ BioObject class >> dumpToDOSFileNamed: filename contents: anObject [ ensure: [ fs close ]. ] -{ #category : #'convenience-filesystem' } +{ #category : 'convenience-filesystem' } BioObject class >> dumpToFileNamed: filename contents: anObject [ "Write anObject to a file named filename in the current directory" @@ -70,7 +72,7 @@ BioObject class >> dumpToFileNamed: filename contents: anObject [ ] -{ #category : #'convenience-filesystem' } +{ #category : 'convenience-filesystem' } BioObject class >> dumpToFileNamedFullPath: filename contents: anObject [ " Write anObject to a file named filename representing a full path " @@ -79,21 +81,21 @@ BioObject class >> dumpToFileNamedFullPath: filename contents: anObject [ anObject dumpToStream: fs ] ensure: [ fs close ]. ] -{ #category : #private } +{ #category : 'private' } BioObject class >> filenameMatchPattern [ " Private - Answer a with the pattern to match files when displaying dialogs " ^ '*.' ] -{ #category : #'convenience-utilities' } +{ #category : 'convenience-utilities' } BioObject class >> generate: repValue repeat: repCount [ " ( self new generate: 2 repeat: 4 ) = #(2 2 2 2) " ^ (Generator on: [ : g | repCount timesRepeat: [ g yield: repValue ] ]) upToEnd ] -{ #category : #'convenience-utilities' } +{ #category : 'convenience-utilities' } BioObject class >> generateJoin: repValue repeat: repNumber [ " Generate, join and answer anObject repetition times (BioObject generateJoin: 2 repeat: 4) = '2222' @@ -109,21 +111,21 @@ BioObject class >> generateJoin: repValue repeat: repNumber [ ] -{ #category : #testing } +{ #category : 'testing' } BioObject class >> isPhyloclassTalk [ " Answer if PhyloclassTalk is installed in this system " ^ Smalltalk hasClassNamed: #PCTApplication ] -{ #category : #testing } +{ #category : 'testing' } BioObject class >> isRunningInMac [ " Answer if the host system is running in Mac OS " ^ BioOSInterfaceEngine adapter isRunningInMac ] -{ #category : #testing } +{ #category : 'testing' } BioObject class >> isRunningInPharo [ " Answer if the host system is running Pharo Smalltalk " @@ -131,35 +133,35 @@ BioObject class >> isRunningInPharo [ ] -{ #category : #testing } +{ #category : 'testing' } BioObject class >> isRunningInSqueak [ " Answer if the host system is running Squeak Smalltalk " ^ Smalltalk image version beginsWith: 'Squeak' ] -{ #category : #testing } +{ #category : 'testing' } BioObject class >> isRunningInUnix [ " Answer if the host system is running in any Unix-like OS " ^ BioOSInterfaceEngine adapter isRunningInUnix ] -{ #category : #testing } +{ #category : 'testing' } BioObject class >> isRunningInWindows [ " Answer if the host system is running in Microsoft Windows " ^ BioOSInterfaceEngine adapter isRunningInWindows ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioObject class >> new [ " #initialize is not called implicitely when sending #new to an object in other Smalltalk dialects. " ^ self basicNew initialize ] -{ #category : #'convenience-filesystem' } +{ #category : 'convenience-filesystem' } BioObject class >> newFileNamed: fileName [ " Answer a for a new fileName in the receiver's configured folder. fileName MUST NOT be an absolute path. If you have absolute path use #newFullFileNamed: " @@ -168,84 +170,84 @@ BioObject class >> newFileNamed: fileName [ ] -{ #category : #scripts } +{ #category : 'scripts' } BioObject class >> scriptsDirectoryName [ " Answer a where the scripts are located " ^ 'BioSmalltalkScripts' ] -{ #category : #scripts } +{ #category : 'scripts' } BioObject class >> scriptsFullDirectoryName [ " Answer a full path where the scripts are located " ^ self workingDirectory asFileReference / self scriptsDirectoryName ] -{ #category : #testing } +{ #category : 'testing' } BioObject class >> testFilesDirectoryName [ " Answer a of the directory name where the files for testing are located " ^ 'BioSmalltalkTestFiles' ] -{ #category : #testing } +{ #category : 'testing' } BioObject class >> testFilesFullDirectoryName [ " Answer a of the full path directory name where the files for testing are located " ^ self workingDirectory asFileReference / self testFilesDirectoryName ] -{ #category : #'convenience-behavior' } +{ #category : 'convenience-behavior' } BioObject >> allFinalClasses [ " Answer a of classes which are not abstract " ^ self class allFinalClasses ] -{ #category : #'convenience-behavior' } +{ #category : 'convenience-behavior' } BioObject >> classFor: aLiteralOrClass [ " Refer to class comment " ^ self class classFor: aLiteralOrClass ] -{ #category : #'convenience-date' } +{ #category : 'convenience-date' } BioObject >> currentDate [ " Answer a with a human readable format of current date " ^ DateAndTime current ] -{ #category : #'convenience-date' } +{ #category : 'convenience-date' } BioObject >> currentSeconds [ "Answer the seconds since 1 January 1901" ^ self class currentSeconds ] -{ #category : #'convenience-date' } +{ #category : 'convenience-date' } BioObject >> dateClass [ " Refer to class comment " ^ self class dateClass ] -{ #category : #accessing } +{ #category : 'accessing' } BioObject >> decode: aString [ " Answer a String. Decodes the fields embedded in aString url ?var1=val1&var2=val2 " ^ self class decode: aString ] -{ #category : #'convenience-filesystem' } +{ #category : 'convenience-filesystem' } BioObject >> dumpToFileNamed: aString [ " Outputs the receiver's contents to a file " self dumpToFileNamed: aString contents: self contents ] -{ #category : #'convenience-filesystem' } +{ #category : 'convenience-filesystem' } BioObject >> dumpToFileNamed: fileName contents: contentsString [ "Outputs contentsString to a file named fileName" @@ -254,7 +256,7 @@ BioObject >> dumpToFileNamed: fileName contents: contentsString [ contents: contentsString ] -{ #category : #'convenience-filesystem' } +{ #category : 'convenience-filesystem' } BioObject >> dumpToFileNamedFullPath: fileName contents: contentsString [ " Outputs contentsString to a file named fileName " @@ -263,7 +265,7 @@ BioObject >> dumpToFileNamedFullPath: fileName contents: contentsString [ contents: contentsString ] -{ #category : #'convenience-filesystem' } +{ #category : 'convenience-filesystem' } BioObject >> dumpToUniqueFileNamed: fileName [ " Outputs the receiver's contents to a file named fileName " @@ -272,7 +274,7 @@ BioObject >> dumpToUniqueFileNamed: fileName [ contents: self contents ] -{ #category : #'convenience-filesystem' } +{ #category : 'convenience-filesystem' } BioObject >> dumpToUniqueFileNamed: fileName contents: contentsString [ " Outputs contentsString to a file named fileName " @@ -281,21 +283,21 @@ BioObject >> dumpToUniqueFileNamed: fileName contents: contentsString [ contents: contentsString ] -{ #category : #'convenience-filesystem' } +{ #category : 'convenience-filesystem' } BioObject >> fileExists: fileName [ " Answer if fileName exists in receiver's working directory " ^ self class fileExists: fileName ] -{ #category : #'convenience-filesystem' } +{ #category : 'convenience-filesystem' } BioObject >> filesIn: aDirectoryString [ " Answer a for a new fileName in the receiver's configured folder " ^ self class filesIn: aDirectoryString ] -{ #category : #'convenience-filesystem' } +{ #category : 'convenience-filesystem' } BioObject >> fullFileNameFor: fileName [ " Answer a FileStream for a new fileName in the receiver's configured folder " @@ -306,55 +308,55 @@ BioObject >> fullFileNameFor: fileName [ fileName. ] -{ #category : #'convenience-utilities' } +{ #category : 'convenience-utilities' } BioObject >> generate: repValue repeat: repCount [ " See comment in class side " ^ self class generate: repValue repeat: repCount ] -{ #category : #'convenience-utilities' } +{ #category : 'convenience-utilities' } BioObject >> generateJoin: repValue repeat: repNumber [ " See comment in class side " ^ self class generateJoin: repValue repeat: repNumber ] -{ #category : #testing } +{ #category : 'testing' } BioObject >> isBioSequence [ " Answer whether the receiver represents a Biological sequence. " ^ false ] -{ #category : #testing } +{ #category : 'testing' } BioObject >> isFastaMultiRecord [ " Answer whether the receiver represents a Multi-FASTA record " ^ false ] -{ #category : #testing } +{ #category : 'testing' } BioObject >> isFastaRecord [ " Answer whether the receiver represents a FASTA record " ^ false ] -{ #category : #testing } +{ #category : 'testing' } BioObject >> isNamingFormat [ ^ false ] -{ #category : #testing } +{ #category : 'testing' } BioObject >> isPhyloclassTalk [ " Answer if PhyloclassTalk is installed in this system " ^ self class isPhyloclassTalk ] -{ #category : #testing } +{ #category : 'testing' } BioObject >> isRunningInMac [ " See class comment " @@ -362,7 +364,7 @@ BioObject >> isRunningInMac [ ] -{ #category : #testing } +{ #category : 'testing' } BioObject >> isRunningInUnix [ " See class comment " @@ -370,7 +372,7 @@ BioObject >> isRunningInUnix [ ] -{ #category : #testing } +{ #category : 'testing' } BioObject >> isRunningInWindows [ " See class comment " @@ -378,42 +380,42 @@ BioObject >> isRunningInWindows [ ] -{ #category : #'convenience-filesystem' } +{ #category : 'convenience-filesystem' } BioObject >> newDirectory: directoryName [ " Create directoryName in the receiver's workingDirectory " ^ self fileDirectoryClass default createDirectory: directoryName ] -{ #category : #'convenience-filesystem' } +{ #category : 'convenience-filesystem' } BioObject >> newFileNamed: fileName [ " Answer a for a new fileName in the receiver's configured folder " ^ self class newFileNamed: fileName ] -{ #category : #'convenience-filesystem' } +{ #category : 'convenience-filesystem' } BioObject >> newFullFileNamed: fileName [ " Answer a for a new fileName in the receiver's configured folder " ^ self class newFullFileNamed: fileName ] -{ #category : #'convenience-filesystem' } +{ #category : 'convenience-filesystem' } BioObject >> openFileNamed: fileName [ " Answer a for fileName. Assume the file exists " ^ self class openFileNamed: fileName ] -{ #category : #'convenience-filesystem' } +{ #category : 'convenience-filesystem' } BioObject >> openFullFileNamed: fileName [ " Answer a for fileName in the image directory. Assume the file exists " ^ self class openFullFileNamed: fileName ] -{ #category : #'convenience-filesystem' } +{ #category : 'convenience-filesystem' } BioObject >> openOrCreateFileNamed: fileName [ " Answer a for fileName in the image directory. " @@ -421,27 +423,27 @@ BioObject >> openOrCreateFileNamed: fileName [ ] -{ #category : #testing } +{ #category : 'testing' } BioObject >> testFilesDirectoryName [ " Answer a where the files for testing will be placed " ^ self class testFilesDirectoryName ] -{ #category : #testing } +{ #category : 'testing' } BioObject >> testFilesFullDirectoryName [ " Private - See class comment " ^ self class testFilesFullDirectoryName ] -{ #category : #accessing } +{ #category : 'accessing' } BioObject >> validate: anObject as: aClass [ ^ aClass accept: anObject ] -{ #category : #'convenience-filesystem' } +{ #category : 'convenience-filesystem' } BioObject >> workingDirectory [ " Answer a representing the current working directory " diff --git a/repository/BioTools/BioOrderedCollection.class.st b/repository/BioTools/BioOrderedCollection.class.st index 60bf1a5b..f07038b8 100644 --- a/repository/BioTools/BioOrderedCollection.class.st +++ b/repository/BioTools/BioOrderedCollection.class.st @@ -2,19 +2,21 @@ Represents a collection which is intended to hold objects used by BioSmalltalk. Objects contained can be iterated, parsed or converted. See specific subclasses for use cases. " Class { - #name : #BioOrderedCollection, - #superclass : #OrderedCollection, - #category : 'BioTools-Collections' + #name : 'BioOrderedCollection', + #superclass : 'OrderedCollection', + #category : 'BioTools-Collections', + #package : 'BioTools', + #tag : 'Collections' } -{ #category : #testing } +{ #category : 'testing' } BioOrderedCollection >> isBioCollection [ " Answer if receiver is a provided by the BioSmalltalk library " ^ true ] -{ #category : #accessing } +{ #category : 'accessing' } BioOrderedCollection >> result [ ^ self diff --git a/repository/BioTools/BioPanel.class.st b/repository/BioTools/BioPanel.class.st index cc059a65..e45e5283 100644 --- a/repository/BioTools/BioPanel.class.st +++ b/repository/BioTools/BioPanel.class.st @@ -4,63 +4,65 @@ Implements an abstract class of recommended panels of markers. BioPanel availablePanels. " Class { - #name : #BioPanel, - #superclass : #BioNamedObject, + #name : 'BioPanel', + #superclass : 'BioNamedObject', #classInstVars : [ 'table' ], - #category : #'BioTools-Repeats' + #category : 'BioTools-Repeats', + #package : 'BioTools', + #tag : 'Repeats' } -{ #category : #accessing } +{ #category : 'accessing' } BioPanel class >> availablePanels [ " Answer a of of available panels " ^ self subclasses collect: #panelName ] -{ #category : #accessing } +{ #category : 'accessing' } BioPanel class >> availableSpecies [ " Answer a of of available species in the receiver " ^ self markersForSpecies keys ] -{ #category : #accessing } +{ #category : 'accessing' } BioPanel class >> markersForSpeciesAt: speciesName [ " Answer a of for the receiver's panel " ^ self markersForSpecies at: speciesName ] -{ #category : #accessing } +{ #category : 'accessing' } BioPanel class >> panelName [ " Private - Answer a with the panel name " ^ self subclassResponsibility ] -{ #category : #accessing } +{ #category : 'accessing' } BioPanel class >> supportedMarkerTypes [ " Answer a of supported types of markers " self subclassResponsibility ] -{ #category : #accessing } +{ #category : 'accessing' } BioPanel class >> supportedSpecies [ " Answer a of with species supported by the receiver " ^ self markersForSpecies keys ] -{ #category : #accessing } +{ #category : 'accessing' } BioPanel class >> table [ ^ table ifNil: [ table := Dictionary new ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioPanel class >> table: anObject [ table := anObject ] diff --git a/repository/BioTools/BioProcessWrapperExecutor.class.st b/repository/BioTools/BioProcessWrapperExecutor.class.st index 86853899..7638e8fa 100644 --- a/repository/BioTools/BioProcessWrapperExecutor.class.st +++ b/repository/BioTools/BioProcessWrapperExecutor.class.st @@ -7,12 +7,14 @@ Most programs should be located in a standard directory and be reachable by the If programName is NOT in the PATH variable, then #which: will not be able to locate the complete path to the program, " Class { - #name : #BioProcessWrapperExecutor, - #superclass : #BioExecutionEngine, - #category : #'BioTools-Adapters' + #name : 'BioProcessWrapperExecutor', + #superclass : 'BioExecutionEngine', + #category : 'BioTools-Adapters', + #package : 'BioTools', + #tag : 'Adapters' } -{ #category : #accessing } +{ #category : 'accessing' } BioProcessWrapperExecutor class >> executeCommand: aCommandName [ " See superimplementor's comment " @@ -29,7 +31,7 @@ BioProcessWrapperExecutor class >> executeCommand: aCommandName [ ifFalse: [ output ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioProcessWrapperExecutor class >> executeCommand: aCommandName parameter: parameterName [ " See superimplementor's comment " @@ -42,14 +44,14 @@ BioProcessWrapperExecutor class >> executeCommand: aCommandName parameter: param upToEnd. ] -{ #category : #testing } +{ #category : 'testing' } BioProcessWrapperExecutor class >> isPreferredAdapter [ " Private - See superimplementor's comment " ^ self isRunningInWindows ] -{ #category : #accessing } +{ #category : 'accessing' } BioProcessWrapperExecutor class >> locateProgram: programName [ " Answer a with the full qualified path to programName if can be located by the which command " @@ -59,7 +61,7 @@ BioProcessWrapperExecutor class >> locateProgram: programName [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioProcessWrapperExecutor class >> locateProgramNamed: programName [ | cmdResult | @@ -70,7 +72,7 @@ BioProcessWrapperExecutor class >> locateProgramNamed: programName [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioProcessWrapperExecutor class >> locateProgramStandard: programName [ " Try to locate programName in standard PATH. @@ -79,7 +81,7 @@ BioProcessWrapperExecutor class >> locateProgramStandard: programName [ ^ self executeCommand: 'where' parameter: programName ] -{ #category : #accessing } +{ #category : 'accessing' } BioProcessWrapperExecutor class >> providerClass [ " See superimplementor's comment " diff --git a/repository/BioTools/BioPropertyObject.class.st b/repository/BioTools/BioPropertyObject.class.st index b3d2dd9e..b212bd7f 100644 --- a/repository/BioTools/BioPropertyObject.class.st +++ b/repository/BioTools/BioPropertyObject.class.st @@ -9,49 +9,51 @@ properties " Class { - #name : #BioPropertyObject, - #superclass : #BioObject, + #name : 'BioPropertyObject', + #superclass : 'BioObject', #instVars : [ 'properties' ], - #category : #'BioTools-Core' + #category : 'BioTools-Core', + #package : 'BioTools', + #tag : 'Core' } -{ #category : #'accessing properties' } +{ #category : 'accessing properties' } BioPropertyObject >> hasProperty: keyName [ " Answer if property keyName is present. " ^ properties notNil and: [ properties includesKey: keyName ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioPropertyObject >> properties [ " Answer a of receiver's properties " ^ properties ] -{ #category : #accessing } +{ #category : 'accessing' } BioPropertyObject >> properties: aCollection [ ^ properties := aCollection ] -{ #category : #iterating } +{ #category : 'iterating' } BioPropertyObject >> propertiesDo: aBlock [ " Evaluate aBlock with each of the receiver's propert as the argument " self properties associationsDo: aBlock ] -{ #category : #'accessing properties' } +{ #category : 'accessing properties' } BioPropertyObject >> propertyAt: keyName [ " Answer the property value associated with aKey. " ^ self propertyAt: keyName ifAbsent: [ self error: 'Property not found' ] ] -{ #category : #'accessing properties' } +{ #category : 'accessing properties' } BioPropertyObject >> propertyAt: aKey ifAbsent: aBlock [ " Answer the property value associated with aKey or, if aKey isn't found, answer the result of evaluating aBlock. " @@ -60,7 +62,7 @@ BioPropertyObject >> propertyAt: aKey ifAbsent: aBlock [ ifFalse: [ properties at: aKey ifAbsent: aBlock ] ] -{ #category : #'accessing properties' } +{ #category : 'accessing properties' } BioPropertyObject >> propertyAt: keyName ifAbsentPut: aBlock [ " Answer the property associated with aKey or, if aKey isn't found store the result of evaluating aBlock as new value. " @@ -69,7 +71,7 @@ BioPropertyObject >> propertyAt: keyName ifAbsentPut: aBlock [ ifAbsent: [ self propertyAt: keyName put: aBlock value ] ] -{ #category : #'accessing properties' } +{ #category : 'accessing properties' } BioPropertyObject >> propertyAt: keyName put: anObject [ " Set the property at aKey to be anObject. If aKey is not found, create a new entry for aKey and set is value to anObject. Answer anObject. " @@ -77,7 +79,7 @@ BioPropertyObject >> propertyAt: keyName put: anObject [ at: keyName put: anObject ] -{ #category : #'accessing properties' } +{ #category : 'accessing properties' } BioPropertyObject >> removeProperty: keyName [ " Remove the property with aKey. Answer the property or raise an error if aKey isn't found. " @@ -86,7 +88,7 @@ BioPropertyObject >> removeProperty: keyName [ ifAbsent: [ self error: 'Property not found' ] ] -{ #category : #'accessing properties' } +{ #category : 'accessing properties' } BioPropertyObject >> removeProperty: keyName ifAbsent: aBlock [ " Remove the property with aKey. Answer the value or, if aKey isn't found, answer the result of evaluating aBlock. " diff --git a/repository/BioTools/BioRNACodonTables.class.st b/repository/BioTools/BioRNACodonTables.class.st index 8383676a..fb84b7f1 100644 --- a/repository/BioTools/BioRNACodonTables.class.st +++ b/repository/BioTools/BioRNACodonTables.class.st @@ -1,16 +1,18 @@ Class { - #name : #BioRNACodonTables, - #superclass : #BioCodonTables, - #category : 'BioTools-Biological' + #name : 'BioRNACodonTables', + #superclass : 'BioCodonTables', + #category : 'BioTools-Biological', + #package : 'BioTools', + #tag : 'Biological' } -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> alternativeFlatwormMitochondrialId [ ^ 9 ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> alternativeFlatwormMitochondrialTable [ @@ -30,7 +32,7 @@ add: 'UUU'-> 'F'; add: 'UUC'-> 'F'; add: 'UUA'-> 'L'; add: 'UUG'-> 'L'; add: 'UC 'GGC'-> 'G'; add: 'GGA'-> 'G'; add: 'GGG'-> 'G'; yourself ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> alternativeFlatwormMitochondrialTableNames [ ^ OrderedCollection @@ -39,19 +41,19 @@ BioRNACodonTables class >> alternativeFlatwormMitochondrialTableNames [ with: 'SGC8' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> alternativeFlatwormMitochondrialTableStartCodons [ ^ OrderedCollection with: 'AUG' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> alternativeFlatwormMitochondrialTableStopCodons [ ^ OrderedCollection with: 'UAG' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> alternativeYeastNuclearTable [ @@ -71,20 +73,20 @@ add: 'UUU'-> 'F'; add: 'UUC'-> 'F'; add: 'UUA'-> 'L'; add: 'UUG'-> 'L'; add: 'UC 'GGG'-> 'G'; yourself ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> alternativeYeastNuclearTableId [ ^ 12 ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> alternativeYeastNuclearTableNames [ ^ OrderedCollection with: 'Alternative Yeast Nuclear' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> alternativeYeastNuclearTableStartCodons [ ^ OrderedCollection @@ -92,7 +94,7 @@ BioRNACodonTables class >> alternativeYeastNuclearTableStartCodons [ with: 'AUG' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> alternativeYeastNuclearTableStopCodons [ ^ OrderedCollection @@ -101,7 +103,7 @@ BioRNACodonTables class >> alternativeYeastNuclearTableStopCodons [ with: 'UGA' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> ascidianMitochondrialTable [ @@ -121,20 +123,20 @@ add: 'UUU'-> 'F'; add: 'UUC'-> 'F'; add: 'UUA'-> 'L'; add: 'UUG'-> 'L'; add: 'UC 'GGA'-> 'G'; add: 'GGG'-> 'G'; yourself ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> ascidianMitochondrialTableId [ ^ 13 ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> ascidianMitochondrialTableNames [ ^ OrderedCollection with: 'Ascidian Mitochondrial' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> ascidianMitochondrialTableStartCodons [ ^ OrderedCollection @@ -144,7 +146,7 @@ BioRNACodonTables class >> ascidianMitochondrialTableStartCodons [ with: 'GUG' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> ascidianMitochondrialTableStopCodons [ ^ OrderedCollection @@ -152,7 +154,7 @@ BioRNACodonTables class >> ascidianMitochondrialTableStopCodons [ with: 'UAG' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> bacterialTable [ @@ -172,20 +174,20 @@ add: 'UUU'-> 'F'; add: 'UUC'-> 'F'; add: 'UUA'-> 'L'; add: 'UUG'-> 'L'; add: 'UC 'GGG'-> 'G'; yourself ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> bacterialTableId [ ^ 11 ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> bacterialTableNames [ ^ OrderedCollection with: 'Bacterial and Plant Plastid' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> bacterialTableStartCodons [ ^ OrderedCollection new @@ -193,7 +195,7 @@ BioRNACodonTables class >> bacterialTableStartCodons [ yourself ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> bacterialTableStopCodons [ ^ OrderedCollection @@ -202,7 +204,7 @@ BioRNACodonTables class >> bacterialTableStopCodons [ with: 'UGA' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> blepharismaMacronuclearTable [ @@ -223,14 +225,14 @@ add: 'UUU'-> 'F'; add: 'UUC'-> 'F'; add: 'UUA'-> 'L'; add: 'UUG'-> 'L'; add: 'UC 'GGA'-> 'G'; add: 'GGG'-> 'G'; yourself ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> blepharismaMacronuclearTableId [ ^ 15 ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> blepharismaMacronuclearTableNames [ @@ -238,7 +240,7 @@ BioRNACodonTables class >> blepharismaMacronuclearTableNames [ with: 'Blepharisma Macronuclear' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> blepharismaMacronuclearTableStartCodons [ @@ -246,7 +248,7 @@ BioRNACodonTables class >> blepharismaMacronuclearTableStartCodons [ with: 'AUG' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> blepharismaMacronuclearTableStopCodons [ @@ -255,7 +257,7 @@ BioRNACodonTables class >> blepharismaMacronuclearTableStopCodons [ with: 'UGA' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> chlorophyceanMitochondrialTable [ @@ -276,14 +278,14 @@ add: 'UUU'-> 'F'; add: 'UUC'-> 'F'; add: 'UUA'-> 'L'; add: 'UUG'-> 'L'; add: 'UC 'GGA'-> 'G'; add: 'GGG'-> 'G'; yourself ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> chlorophyceanMitochondrialTableId [ ^ 16 ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> chlorophyceanMitochondrialTableNames [ @@ -291,7 +293,7 @@ BioRNACodonTables class >> chlorophyceanMitochondrialTableNames [ with: 'Chlorophycean Mitochondrial' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> chlorophyceanMitochondrialTableStartCodons [ @@ -299,7 +301,7 @@ BioRNACodonTables class >> chlorophyceanMitochondrialTableStartCodons [ with: 'AUG' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> chlorophyceanMitochondrialTableStopCodons [ @@ -308,7 +310,7 @@ BioRNACodonTables class >> chlorophyceanMitochondrialTableStopCodons [ with: 'UGA' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> ciliateNuclearTable [ @@ -328,13 +330,13 @@ add: 'UUU'-> 'F'; add: 'UUC'-> 'F'; add: 'UUA'-> 'L'; add: 'UUG'-> 'L'; add: 'UC 'GGC'-> 'G'; add: 'GGA'-> 'G'; add: 'GGG'-> 'G'; yourself ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> ciliateNuclearTableId [ ^ 6 ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> ciliateNuclearTableNames [ ^ OrderedCollection @@ -345,21 +347,21 @@ BioRNACodonTables class >> ciliateNuclearTableNames [ ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> ciliateNuclearTableStartCodons [ ^ OrderedCollection with: 'AUG' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> ciliateNuclearTableStopCodons [ ^ OrderedCollection with: 'UGA' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> echinodermMitochondrialTable [ @@ -379,13 +381,13 @@ add: 'UUU'-> 'F'; add: 'UUC'-> 'F'; add: 'UUA'-> 'L'; add: 'UUG'-> 'L'; add: 'UC 'GGA'-> 'G'; add: 'GGG'-> 'G'; yourself ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> echinodermMitochondrialTableId [ ^ 9 ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> echinodermMitochondrialTableNames [ ^ OrderedCollection @@ -394,7 +396,7 @@ BioRNACodonTables class >> echinodermMitochondrialTableNames [ with: 'SGC8' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> echinodermMitochondrialTableStartCodons [ ^ OrderedCollection @@ -402,7 +404,7 @@ BioRNACodonTables class >> echinodermMitochondrialTableStartCodons [ with: 'AUG' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> echinodermMitochondrialTableStopCodons [ ^ OrderedCollection @@ -410,7 +412,7 @@ BioRNACodonTables class >> echinodermMitochondrialTableStopCodons [ with: 'UAG' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> euplotidNuclearTable [ @@ -430,13 +432,13 @@ add: 'UUU'-> 'F'; add: 'UUC'-> 'F'; add: 'UUA'-> 'L'; add: 'UUG'-> 'L'; add: 'UC 'GGA'-> 'G'; add: 'GGG'-> 'G'; yourself ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> euplotidNuclearTableId [ ^ 10 ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> euplotidNuclearTableNames [ ^ OrderedCollection @@ -444,14 +446,14 @@ BioRNACodonTables class >> euplotidNuclearTableNames [ with: 'SGC9' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> euplotidNuclearTableStartCodons [ ^ OrderedCollection with: 'AUG' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> euplotidNuclearTableStopCodons [ ^ OrderedCollection @@ -459,7 +461,7 @@ BioRNACodonTables class >> euplotidNuclearTableStopCodons [ with: 'UAG' ] -{ #category : #'initialize-release' } +{ #category : 'initialize-release' } BioRNACodonTables class >> initialize [ " Private - Initialize receiver's codon tables " | tablesCount tableSelectors startIndex | @@ -474,7 +476,7 @@ BioRNACodonTables class >> initialize [ startIndex := startIndex + 5 ] ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> invertebrateMitocondrialTable [ @@ -495,14 +497,14 @@ add: 'UUU'-> 'F'; add: 'UUC'-> 'F'; add: 'UUA'-> 'L'; add: 'UUG'-> 'L'; add: 'UC 'GGA'-> 'G'; add: 'GGG'-> 'G'; yourself. ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> invertebrateMitocondrialTableId [ ^ 5 ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> invertebrateMitocondrialTableNames [ @@ -511,7 +513,7 @@ BioRNACodonTables class >> invertebrateMitocondrialTableNames [ with: 'SGC4' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> invertebrateMitocondrialTableStartCodons [ @@ -524,7 +526,7 @@ BioRNACodonTables class >> invertebrateMitocondrialTableStartCodons [ with: 'GUG' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> invertebrateMitocondrialTableStopCodons [ @@ -533,7 +535,7 @@ BioRNACodonTables class >> invertebrateMitocondrialTableStopCodons [ with: 'UAG' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> protozoanMitocondrialTable [ @@ -542,14 +544,14 @@ BioRNACodonTables class >> protozoanMitocondrialTable [ add: 'UUU'-> 'F'; add: 'UUC'-> 'F'; add: 'UUA'-> 'L'; add: 'UUG'-> 'L'; add: 'UCU'-> 'S'; add: 'UCC'-> 'S'; add: 'UCA'-> 'S'; add: 'UCG'-> 'S'; add: 'UAU'-> 'Y'; add: 'UAC'-> 'Y'; add: 'UGU'-> 'C'; add: 'UGC'-> 'C'; add: 'UGA'-> 'W'; add: 'UGG'-> 'W'; add: 'CUU'-> 'L'; add: 'CUC'-> 'L'; add: 'CUA'-> 'L'; add: 'CUG'-> 'L'; add: 'CCU'-> 'P'; add: 'CCC'-> 'P'; add: 'CCA'-> 'P'; add: 'CCG'-> 'P'; add: 'CAU'-> 'H'; add: 'CAC'-> 'H'; add: 'CAA'-> 'Q'; add: 'CAG'-> 'Q'; add: 'CGU'-> 'R'; add: 'CGC'-> 'R'; add: 'CGA'-> 'R'; add: 'CGG'-> 'R'; add: 'AUU'-> 'I'; add: 'AUC'-> 'I'; add: 'AUA'-> 'I'; add: 'AUG'-> 'M'; add: 'ACU'-> 'T'; add: 'ACC'-> 'T'; add: 'ACA'-> 'T'; add: 'ACG'-> 'T'; add: 'AAU'-> 'N'; add: 'AAC'-> 'N'; add: 'AAA'-> 'K'; add: 'AAG'-> 'K'; add: 'AGU'-> 'S'; add: 'AGC'-> 'S'; add: 'AGA'-> 'R'; add: 'AGG'-> 'R'; add: 'GUU'-> 'V'; add: 'GUC'-> 'V'; add: 'GUA'-> 'V'; add: 'GUG'-> 'V'; add: 'GCU'-> 'A'; add: 'GCC'-> 'A'; add: 'GCA'-> 'A'; add: 'GCG'-> 'A'; add: 'GAU'-> 'D'; add: 'GAC'-> 'D'; add: 'GAA'-> 'E'; add: 'GAG'-> 'E'; add: 'GGU'-> 'G'; add: 'GGC'-> 'G'; add: 'GGA'-> 'G'; add: 'GGG'-> 'G'; yourself ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> protozoanMitocondrialTableId [ ^ 4 ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> protozoanMitocondrialTableNames [ @@ -562,7 +564,7 @@ BioRNACodonTables class >> protozoanMitocondrialTableNames [ with: 'SGC3' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> protozoanMitocondrialTableStartCodons [ @@ -571,7 +573,7 @@ BioRNACodonTables class >> protozoanMitocondrialTableStartCodons [ yourself ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> protozoanMitocondrialTableStopCodons [ @@ -580,7 +582,7 @@ BioRNACodonTables class >> protozoanMitocondrialTableStopCodons [ with: 'UAG' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> scenedesmusObliquusMitochondrialTable [ @@ -600,27 +602,27 @@ add: 'UUU'-> 'F'; add: 'UUC'-> 'F'; add: 'UUA'-> 'L'; add: 'UUG'-> 'L'; add: 'UC 'GGG'-> 'G'; yourself ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> scenedesmusObliquusMitochondrialTableId [ ^ 22 ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> scenedesmusObliquusMitochondrialTableNames [ ^ OrderedCollection with: 'Scenedesmus obliquus Mitochondrial' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> scenedesmusObliquusMitochondrialTableStartCodons [ ^ OrderedCollection with: 'AUG' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> scenedesmusObliquusMitochondrialTableStopCodons [ ^ OrderedCollection @@ -629,7 +631,7 @@ BioRNACodonTables class >> scenedesmusObliquusMitochondrialTableStopCodons [ with: 'UAG' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> standardTable [ " Answer the NCBI standard codon table for DNA" @@ -698,14 +700,14 @@ BioRNACodonTables class >> standardTable [ yourself ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> standardTableId [ " Answer the NCBI standard codon table ID for DNA" ^ 1 ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> standardTableNames [ " Answer the NCBI standard codon table for DNA" @@ -714,7 +716,7 @@ BioRNACodonTables class >> standardTableNames [ with: 'SGC0' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> standardTableStartCodons [ " Answer the NCBI standard codon table start codons for DNA" @@ -724,7 +726,7 @@ BioRNACodonTables class >> standardTableStartCodons [ with: 'AUG' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> standardTableStopCodons [ " Answer the NCBI standard codon table stop codons for DNA" @@ -734,7 +736,7 @@ BioRNACodonTables class >> standardTableStopCodons [ with: 'UGA' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> thraustochytriumMitochondrialTable [ @@ -754,14 +756,14 @@ add: 'UUU'-> 'F'; add: 'UUC'-> 'F'; add: 'UUG'-> 'L'; add: 'UCU'-> 'S'; add: 'UC 'GAG'-> 'E'; add: 'GGU'-> 'G'; add: 'GGC'-> 'G'; add: 'GGA'-> 'G'; add: 'GGG'-> 'G'; yourself ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> thraustochytriumMitochondrialTableId [ ^ 23 ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> thraustochytriumMitochondrialTableNames [ @@ -769,7 +771,7 @@ BioRNACodonTables class >> thraustochytriumMitochondrialTableNames [ with: 'Thraustochytrium Mitochondrial' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> thraustochytriumMitochondrialTableStartCodons [ @@ -779,7 +781,7 @@ BioRNACodonTables class >> thraustochytriumMitochondrialTableStartCodons [ with: 'GUG' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> thraustochytriumMitochondrialTableStopCodons [ @@ -790,7 +792,7 @@ BioRNACodonTables class >> thraustochytriumMitochondrialTableStopCodons [ with: 'UGA' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> trematodeMitochondrialTable [ @@ -810,20 +812,20 @@ add: 'UUU'-> 'F'; add: 'UUC'-> 'F'; add: 'UUA'-> 'L'; add: 'UUG'-> 'L'; add: 'UC 'GGA'-> 'G'; add: 'GGG'-> 'G'; yourself ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> trematodeMitochondrialTableId [ ^ 21 ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> trematodeMitochondrialTableNames [ ^ OrderedCollection with: 'Trematode Mitochondrial' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> trematodeMitochondrialTableStartCodons [ ^ OrderedCollection @@ -831,7 +833,7 @@ BioRNACodonTables class >> trematodeMitochondrialTableStartCodons [ with: 'AUG' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> trematodeMitochondrialTableStopCodons [ ^ OrderedCollection @@ -839,7 +841,7 @@ BioRNACodonTables class >> trematodeMitochondrialTableStopCodons [ with: 'UAG' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> vertebrateMitocondrialTable [ " Answer the NCBI vertebrate mitochondrial codon table for DNA" @@ -909,7 +911,7 @@ BioRNACodonTables class >> vertebrateMitocondrialTable [ yourself. ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> vertebrateMitocondrialTableId [ " Answer the NCBI VM table ID " @@ -917,7 +919,7 @@ BioRNACodonTables class >> vertebrateMitocondrialTableId [ ^ 2 ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> vertebrateMitocondrialTableNames [ " Answer the NCBI VM codon table names for DNA" @@ -927,7 +929,7 @@ BioRNACodonTables class >> vertebrateMitocondrialTableNames [ with: 'SGC1' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> vertebrateMitocondrialTableStartCodons [ " Answer the NCBI VM codon table start codons for DNA" @@ -940,7 +942,7 @@ BioRNACodonTables class >> vertebrateMitocondrialTableStartCodons [ with: 'GUG' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> vertebrateMitocondrialTableStopCodons [ " Answer the NCBI VM codon table stop codons for DNA" @@ -952,7 +954,7 @@ BioRNACodonTables class >> vertebrateMitocondrialTableStopCodons [ with: 'AGG' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> yeastMitocondrialTable [ " Answer the NCBI yeast mitochondrial codon table for DNA" @@ -963,7 +965,7 @@ add: 'UUU'-> 'F'; add: 'UUC'-> 'F'; add: 'UUA'-> 'L'; add: 'UUG'-> 'L'; add: 'UC yourself. ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> yeastMitocondrialTableId [ " Answer the NCBI yeast table ID " @@ -971,7 +973,7 @@ BioRNACodonTables class >> yeastMitocondrialTableId [ ^ 3 ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> yeastMitocondrialTableNames [ " Answer the NCBI standard codon table for DNA" @@ -981,7 +983,7 @@ BioRNACodonTables class >> yeastMitocondrialTableNames [ with: 'SGC2' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> yeastMitocondrialTableStartCodons [ " Answer the NCBI yeast codon table start codons for DNA" @@ -991,7 +993,7 @@ BioRNACodonTables class >> yeastMitocondrialTableStartCodons [ with: 'AUG' ] -{ #category : #tables } +{ #category : 'tables' } BioRNACodonTables class >> yeastMitocondrialTableStopCodons [ " Answer the NCBI VM codon table stop codons for DNA" diff --git a/repository/BioTools/BioReader.class.st b/repository/BioTools/BioReader.class.st index 475c2cba..45ce78d1 100644 --- a/repository/BioTools/BioReader.class.st +++ b/repository/BioTools/BioReader.class.st @@ -14,17 +14,19 @@ Instance Variables: contents Contains the raw contents as retrieved from the initial user's instantiation. " Class { - #name : #BioReader, - #superclass : #BioNamedObject, + #name : 'BioReader', + #superclass : 'BioNamedObject', #instVars : [ 'contents', 'nextReader', 'parser' ], - #category : #'BioTools-IO' + #category : 'BioTools-IO', + #package : 'BioTools', + #tag : 'IO' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioReader class >> filesFromXMLDirectory: aDirectoryString [ " Answer a Collection of readers iterating over the files located at aDirectoryString " @@ -33,7 +35,7 @@ BioReader class >> filesFromXMLDirectory: aDirectoryString [ thenCollect: [ : file | self newFromXML: file contents ] ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioReader class >> for: aString [ " Private - Answer a Class which is the preferred one for reading aString " @@ -42,14 +44,14 @@ BioReader class >> for: aString [ ifNone: [ self error: 'No preferred readers found' translated ] ] -{ #category : #private } +{ #category : 'private' } BioReader class >> isPreferredFor: aString [ " Answer if aString is the most appropriate content for the receiver " ^ false ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioReader class >> newFromFlat: aFileLocationOrString [ " Answer a new reader using file located at aFileLocationOrString " @@ -61,14 +63,14 @@ BioReader class >> newFromFlat: aFileLocationOrString [ yourself ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioReader class >> newFromFlatCollection: aCollectionOfFlat [ " Answer a Collection of readers iterating over the Flat Strings at aCollectionOfFlat " ^ aCollectionOfFlat collect: [ : string | self newFromFlat: string ] ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioReader class >> newFromFlatPath: aFileLocationOrString [ " Answer a new reader using file located at aFileLocationOrString " @@ -78,7 +80,7 @@ BioReader class >> newFromFlatPath: aFileLocationOrString [ ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioReader class >> newFromXML: aString [ " Answer a new reader using file located at aFileLocationOrString " @@ -87,14 +89,14 @@ BioReader class >> newFromXML: aString [ yourself ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioReader class >> newFromXMLCollection: xmlCollection [ " Answer a Collection of readers iterating over the XML Strings at aCollectionOfXMLs " ^ xmlCollection collect: [ : rsObject | self newFromXML: rsObject result] ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioReader class >> newFromXMLFile: aFileLocation [ " Answer a new receiver's instance using contents located at aFileLocationOrString " @@ -104,7 +106,7 @@ BioReader class >> newFromXMLFile: aFileLocation [ ] -{ #category : #'accessing parser' } +{ #category : 'accessing parser' } BioReader >> accessNode: aNodeName [ " Private - Answer an object from the search result corresponding to aNodeName or raise an exception if there are no results in the receiver " @@ -118,7 +120,7 @@ BioReader >> accessNode: aNodeName [ ifAbsent: [ self signalNotFound: 'Empty result set' translated ] ] -{ #category : #'accessing parser' } +{ #category : 'accessing parser' } BioReader >> accessNodes: aNodeName [ " Private - Answer a Collection with search results corresponding to aNodeName or raise an exception if there are no results in the receiver " @@ -131,44 +133,44 @@ BioReader >> accessNodes: aNodeName [ ifTrue: [ self signalInvalidObject: 'Empty result set' translated ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioReader >> contents [ ^ contents ] -{ #category : #accessing } +{ #category : 'accessing' } BioReader >> contents: anObject [ ^ contents := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioReader >> dumpToStream: aStream [ contents ifNotNil: [ contents dumpToStream: aStream ] ] -{ #category : #testing } +{ #category : 'testing' } BioReader >> hasContents [ " Answer if the receiver's contents is not empty " ^ self contents notNil and: [ self contents notEmpty ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioReader >> nextReader [ ^ nextReader ifNil: [ nextReader := self defaultNextReader ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioReader >> nextReader: anObject [ nextReader := anObject ] -{ #category : #'accessing parser' } +{ #category : 'accessing parser' } BioReader >> parse: anObject [ ^ self parser parse: anObject @@ -177,7 +179,7 @@ BioReader >> parse: anObject [ ] -{ #category : #'accessing parser' } +{ #category : 'accessing parser' } BioReader >> parseDocument [ " Parse the receiver's contents and answer an Object as provided by the receiver's parser " @@ -187,42 +189,42 @@ BioReader >> parseDocument [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioReader >> parser [ ^ parser ifNil: [ parser := self parserClass ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioReader >> parser: aParserClass [ " Set the receiver's parser to aParserClass " parser := aParserClass ] -{ #category : #'accessing parser' } +{ #category : 'accessing parser' } BioReader >> parserClass [ " Answer a Class responsible for parsing the receiver's contents or input " self subclassResponsibility ] -{ #category : #'accessing parser' } +{ #category : 'accessing parser' } BioReader >> results [ "Answer the value of results" ^ contents ] -{ #category : #'accessing parser' } +{ #category : 'accessing parser' } BioReader >> results: anObject [ "Set the value of results" contents := anObject ] -{ #category : #'accessing parser' } +{ #category : 'accessing parser' } BioReader >> selectNodes: nodesCollection in: anObject [ ^ self parserClass @@ -233,7 +235,7 @@ BioReader >> selectNodes: nodesCollection in: anObject [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioReader >> size [ "Answer how many elements the receiver contains." diff --git a/repository/BioTools/BioReadersCollection.class.st b/repository/BioTools/BioReadersCollection.class.st index 222dc16f..f3112b56 100644 --- a/repository/BioTools/BioReadersCollection.class.st +++ b/repository/BioTools/BioReadersCollection.class.st @@ -1,14 +1,16 @@ Class { - #name : #BioReadersCollection, - #superclass : #BioOrderedCollection, + #name : 'BioReadersCollection', + #superclass : 'BioOrderedCollection', #instVars : [ 'readerClass', 'parser' ], - #category : 'BioTools-Collections' + #category : 'BioTools-Collections', + #package : 'BioTools', + #tag : 'Collections' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioReadersCollection class >> filesFromXMLDirectory: aDirectoryString [ " Answer a new instance of the receiver with XML file contents from aDirectoryString " @@ -17,20 +19,20 @@ BioReadersCollection class >> filesFromXMLDirectory: aDirectoryString [ thenCollect: [ : file | (BioReader for: file contents) newFromXML: file ]). ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioReadersCollection class >> newFromXMLCollection: xmlCollection [ " Answer a new instance of the receiver with XML contents from xmlCollection " ^ self withAll: (self readerClass newFromXMLCollection: xmlCollection). ] -{ #category : #accessing } +{ #category : 'accessing' } BioReadersCollection class >> readerClass [ ^ self subclassResponsibility ] -{ #category : #accessing } +{ #category : 'accessing' } BioReadersCollection >> fileOutXMLReaders [ " Private - Helper method to be used inside an Inspector/Explorer to dump receiver's contents in XML files " @@ -42,7 +44,7 @@ BioReadersCollection >> fileOutXMLReaders [ contents: r contents ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioReadersCollection >> parseDocuments [ " Answer a of with qualifier -> value associations " @@ -55,23 +57,23 @@ BioReadersCollection >> parseDocuments [ ^ collection joinUsing: self species new ] -{ #category : #accessing } +{ #category : 'accessing' } BioReadersCollection >> parser [ ^ parser ] -{ #category : #accessing } +{ #category : 'accessing' } BioReadersCollection >> parser: aParser [ " Set aParser to each of the receiver's elements " self do: [ : eachReader | eachReader parser: aParser ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioReadersCollection >> readerClass [ ^ readerClass ] -{ #category : #accessing } +{ #category : 'accessing' } BioReadersCollection >> readerClass: anObject [ readerClass := anObject ] diff --git a/repository/BioTools/BioRemoteCommandObject.class.st b/repository/BioTools/BioRemoteCommandObject.class.st index 47cccb2a..c5fd8a14 100644 --- a/repository/BioTools/BioRemoteCommandObject.class.st +++ b/repository/BioTools/BioRemoteCommandObject.class.st @@ -3,12 +3,14 @@ A remote command includes an URL and provides behavior for handling parameters. " Class { - #name : #BioRemoteCommandObject, - #superclass : #BioCommandObject, - #category : #'BioTools-Core' + #name : 'BioRemoteCommandObject', + #superclass : 'BioCommandObject', + #category : 'BioTools-Core', + #package : 'BioTools', + #tag : 'Core' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioRemoteCommandObject class >> for: aBioObject [ " Answer a new instance of the receiver, initializing receiver's status and setting aBioObject as its client " @@ -18,21 +20,21 @@ BioRemoteCommandObject class >> for: aBioObject [ yourself ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioRemoteCommandObject class >> on: aBioObject [ " Answer a new instance of the receiver setting aBioObject as its client " ^ self basicNew initializeOn: aBioObject ] -{ #category : #'accessing private' } +{ #category : 'accessing private' } BioRemoteCommandObject >> baseUrl [ " Private - See superimplementor's comment " ^ self client baseUrl ] -{ #category : #accessing } +{ #category : 'accessing' } BioRemoteCommandObject >> tokenizeParameters [ " Answer a with each item being a receiver's parameter " diff --git a/repository/BioTools/BioRepeatSequence.class.st b/repository/BioTools/BioRepeatSequence.class.st index c5adabc4..cffc4fe1 100644 --- a/repository/BioTools/BioRepeatSequence.class.st +++ b/repository/BioTools/BioRepeatSequence.class.st @@ -8,8 +8,8 @@ Abstract class to represent repetitive sequences. " Class { - #name : #BioRepeatSequence, - #superclass : #BioSequence, + #name : 'BioRepeatSequence', + #superclass : 'BioSequence', #instVars : [ 'genotype', 'repeats', @@ -18,10 +18,12 @@ Class { 'maxMotifSize', 'minMotifSize' ], - #category : #'BioTools-Repeats' + #category : 'BioTools-Repeats', + #package : 'BioTools', + #tag : 'Repeats' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioRepeatSequence class >> name: nameString sequence: seqString motif: motifString repeats: repNumber [ " Answer a new object representing a tandem repeat sequence " @@ -31,7 +33,7 @@ BioRepeatSequence class >> name: nameString sequence: seqString motif: motifStri yourself ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioRepeatSequence class >> name: nameString sequence: seqString motif: motifString repeats: repNumber repeatStartPosition: repStartNumber [ " Answer a new object representing a tandem repeat sequence " @@ -42,7 +44,7 @@ BioRepeatSequence class >> name: nameString sequence: seqString motif: motifStri yourself ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioRepeatSequence class >> newLocus: aBioLocus markers: anObject [ " Answer a new object representing a Microsatellite marker " @@ -52,7 +54,7 @@ BioRepeatSequence class >> newLocus: aBioLocus markers: anObject [ yourself ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioRepeatSequence class >> newMotif: motifString repeats: repNumber [ " Answer a new object representing a tandem repeat sequence " @@ -62,7 +64,7 @@ BioRepeatSequence class >> newMotif: motifString repeats: repNumber [ yourself ] -{ #category : #converting } +{ #category : 'converting' } BioRepeatSequence >> asString [ " Answer a with the receiver's sequence " @@ -70,33 +72,33 @@ BioRepeatSequence >> asString [ ] -{ #category : #'accessing - public' } +{ #category : 'accessing - public' } BioRepeatSequence >> beCompoundRepeat [ self repeatStructure: #compound ] -{ #category : #'accessing - public' } +{ #category : 'accessing - public' } BioRepeatSequence >> beSimpleRepeat [ self repeatStructure: #simple ] -{ #category : #accessing } +{ #category : 'accessing' } BioRepeatSequence >> end [ " Answer an with the receiver's genotype end position " ^ self genotype end ] -{ #category : #accessing } +{ #category : 'accessing' } BioRepeatSequence >> end: anObject [ " Set anObject as the receiver's genotype end position " ^ self genotype end: (self validatePosition: anObject) ] -{ #category : #accessing } +{ #category : 'accessing' } BioRepeatSequence >> genotype [ " Answer a representing the receiver's genotype " @@ -104,48 +106,48 @@ BioRepeatSequence >> genotype [ ifNil: [ genotype := BioGenotype new ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioRepeatSequence >> genotype: aBioGenotype [ genotype := aBioGenotype ] -{ #category : #testing } +{ #category : 'testing' } BioRepeatSequence >> isCompoundRepeat [ " Answer if receiver repeat structure is compound " ^ self repeatStructure = #compound ] -{ #category : #testing } +{ #category : 'testing' } BioRepeatSequence >> isSimpleRepeat [ " Answer if receiver repeat structure is simple " ^ self repeatStructure = #simple ] -{ #category : #accessing } +{ #category : 'accessing' } BioRepeatSequence >> locus [ " Answer the receiver's " ^ locus ] -{ #category : #accessing } +{ #category : 'accessing' } BioRepeatSequence >> locus: aBioLocus [ " Set the receiver's locus to aBioLocus " locus := aBioLocus ] -{ #category : #accessing } +{ #category : 'accessing' } BioRepeatSequence >> locusName [ " Answer a with receiver's locus name " ^ self locus name ] -{ #category : #defaults } +{ #category : 'defaults' } BioRepeatSequence >> maxMotifSize [ " See comment in #defaultMotifRange " @@ -153,7 +155,7 @@ BioRepeatSequence >> maxMotifSize [ ifNil: [ maxMotifSize := self defaultMaxMotifSize ] ] -{ #category : #defaults } +{ #category : 'defaults' } BioRepeatSequence >> minMotifSize [ " See comment in #defaultMotifRange " @@ -161,14 +163,14 @@ BioRepeatSequence >> minMotifSize [ ifNil: [ minMotifSize := self defaultMinMotifSize ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioRepeatSequence >> motif [ " See comment in #sequence " ^ self sequence ] -{ #category : #accessing } +{ #category : 'accessing' } BioRepeatSequence >> motif: aString [ " See comment in #sequence: " @@ -176,7 +178,7 @@ BioRepeatSequence >> motif: aString [ self sequence: aString ] -{ #category : #defaults } +{ #category : 'defaults' } BioRepeatSequence >> motifRange [ " Answer an representing the size range allowed for the receiver, using as reference: Microsatellite definition at the US National Library of Medicine Medical Subject Headings (MeSH) " @@ -184,7 +186,7 @@ BioRepeatSequence >> motifRange [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioRepeatSequence >> motifSize [ " Answer a with the size of the repeat motif " @@ -192,26 +194,26 @@ BioRepeatSequence >> motifSize [ ] -{ #category : #private } +{ #category : 'private' } BioRepeatSequence >> nullValue [ ^ 9 negated ] -{ #category : #accessing } +{ #category : 'accessing' } BioRepeatSequence >> positions [ " Answer an with receiver's allelic positions " ^ self start -> self end ] -{ #category : #accessing } +{ #category : 'accessing' } BioRepeatSequence >> positions: anObject [ anObject setMicrosatelliteGenotypeFor: self ] -{ #category : #printing } +{ #category : 'printing' } BioRepeatSequence >> printOn: aStream [ " Private - See superimplementor's comment " @@ -235,42 +237,42 @@ BioRepeatSequence >> printOn: aStream [ ] -{ #category : #'accessing - private' } +{ #category : 'accessing - private' } BioRepeatSequence >> repeatStructure [ ^ repeatStructure ] -{ #category : #'accessing - private' } +{ #category : 'accessing - private' } BioRepeatSequence >> repeatStructure: aSymbol [ repeatStructure := aSymbol ] -{ #category : #accessing } +{ #category : 'accessing' } BioRepeatSequence >> repeats [ ^ repeats ] -{ #category : #accessing } +{ #category : 'accessing' } BioRepeatSequence >> repeats: anObject [ repeats := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioRepeatSequence >> start [ " Answer an with the receiver's genotype start position " ^ self genotype start ] -{ #category : #accessing } +{ #category : 'accessing' } BioRepeatSequence >> start: anObject [ " Set anObject as the receiver's genotype start position " ^ self genotype start: (self validatePosition: anObject) ] -{ #category : #private } +{ #category : 'private' } BioRepeatSequence >> validatePosition: anObject [ " Answer a matching aString " diff --git a/repository/BioTools/BioRestriction.class.st b/repository/BioTools/BioRestriction.class.st index cf713d47..dfd4c9f5 100644 --- a/repository/BioTools/BioRestriction.class.st +++ b/repository/BioTools/BioRestriction.class.st @@ -1,10 +1,12 @@ Class { - #name : #BioRestriction, - #superclass : #BioObject, - #category : #'BioTools-Restriction' + #name : 'BioRestriction', + #superclass : 'BioObject', + #category : 'BioTools-Restriction', + #package : 'BioTools', + #tag : 'Restriction' } -{ #category : #accessing } +{ #category : 'accessing' } BioRestriction class >> downloadLocations [ ^ #( @@ -12,14 +14,14 @@ BioRestriction class >> downloadLocations [ ) ] -{ #category : #accessing } +{ #category : 'accessing' } BioRestriction class >> genBankAnnocationsFilepath [ "Answer a of the GenBank annotated file" ^ self openFileNamed: 'prod.txt' ] -{ #category : #accessing } +{ #category : 'accessing' } BioRestriction class >> readGenBankAnnotations [ "Answer a of GenBank annotations from REBASE" @@ -28,7 +30,7 @@ BioRestriction class >> readGenBankAnnotations [ delimiter: Character tab ] -{ #category : #accessing } +{ #category : 'accessing' } BioRestriction class >> readGenBankAnnotationsAsDataFrame [ "Answer a of GenBank annotations from REBASE" @@ -38,7 +40,7 @@ BioRestriction class >> readGenBankAnnotationsAsDataFrame [ separator: Character tab ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } BioRestriction >> site [ self subclassResponsibility diff --git a/repository/BioTools/BioResultObject.class.st b/repository/BioTools/BioResultObject.class.st index 26fa11e8..8a637abb 100644 --- a/repository/BioTools/BioResultObject.class.st +++ b/repository/BioTools/BioResultObject.class.st @@ -9,8 +9,8 @@ It also contains an exit status which you may query by sending the #status messa " Class { - #name : #BioResultObject, - #superclass : #BioNamedObject, + #name : 'BioResultObject', + #superclass : 'BioNamedObject', #instVars : [ 'updater', 'history', @@ -20,17 +20,19 @@ Class { 'exitStatus', 'command' ], - #category : #'BioTools-Query' + #category : 'BioTools-Query', + #package : 'BioTools', + #tag : 'Query' } -{ #category : #accessing } +{ #category : 'accessing' } BioResultObject class >> accept: anObject [ " Answer if anObject can be instantiated with the receiver " ^ anObject respondsTo: #addResult:. ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioResultObject class >> for: aBioGBSeqCollection [ ^ aBioGBSeqCollection isEmpty @@ -38,21 +40,21 @@ BioResultObject class >> for: aBioGBSeqCollection [ ifFalse: [ self halt. BioNCBIGenBankResult new ] ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioResultObject class >> newFrom: aCollection [ " Answer a new instance of the receiver using aCollection as result. " ^ self new filter: aCollection ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioResultObject class >> on: aCollection [ " Answer a new instance of the receiver using aCollection as result " ^ self new result: aCollection ] -{ #category : #comparing } +{ #category : 'comparing' } BioResultObject >> = anObject [ "Answer whether the receiver and anObject represent the same object." " Two search results are equal if @@ -70,63 +72,63 @@ BioResultObject >> = anObject [ ] -{ #category : #'accessing private' } +{ #category : 'accessing private' } BioResultObject >> beFailed [ " Set the receiver's last operation status to failed " self status: false ] -{ #category : #'accessing private' } +{ #category : 'accessing private' } BioResultObject >> beSuccess [ " Set the receiver's last operation status to failed " self status: true ] -{ #category : #accessing } +{ #category : 'accessing' } BioResultObject >> command [ " Answer a with the receiver's launched command " ^ command ] -{ #category : #accessing } +{ #category : 'accessing' } BioResultObject >> command: aString [ " Set the receiver's command to be aString " command := aString ] -{ #category : #accessing } +{ #category : 'accessing' } BioResultObject >> contents [ " Answer a with the receiver's result object " ^ self result contents "results" ] -{ #category : #'accessing private' } +{ #category : 'accessing private' } BioResultObject >> definitionString [ " Answer a descriptive for the receiver " ^ 'Result' ] -{ #category : #iterating } +{ #category : 'iterating' } BioResultObject >> do: aBlock [ "Refer to the comment in Collection|do:." ^ result do: aBlock ] -{ #category : #accessing } +{ #category : 'accessing' } BioResultObject >> dumpToStream: aStream [ " Private - Write the receiver's contents into aStream " aStream nextPutAll: self result ] -{ #category : #accessing } +{ #category : 'accessing' } BioResultObject >> formatters [ " Answer a of " @@ -134,32 +136,32 @@ BioResultObject >> formatters [ ifNil: [ formatters := OrderedCollection new ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioResultObject >> formatters: aCollection [ ^ formatters := aCollection ] -{ #category : #comparing } +{ #category : 'comparing' } BioResultObject >> hash [ " Answer an that is related to the identity of the receiver. " ^ self result hash bitXor: self names hash ] -{ #category : #accessing } +{ #category : 'accessing' } BioResultObject >> history [ ^ history ] -{ #category : #accessing } +{ #category : 'accessing' } BioResultObject >> history: anObject [ history := anObject ] -{ #category : #'initialize-release' } +{ #category : 'initialize-release' } BioResultObject >> initialize [ " Private - Initialize receiver's metadata " @@ -169,99 +171,99 @@ BioResultObject >> initialize [ ] -{ #category : #testing } +{ #category : 'testing' } BioResultObject >> isEmpty [ " Answer whether the receiver contains any elements " ^ self result isEmpty ] -{ #category : #testing } +{ #category : 'testing' } BioResultObject >> isEntrezSearchResult [ " Answer if receiver represents a result obtained through Entrez system " ^ false ] -{ #category : #accessing } +{ #category : 'accessing' } BioResultObject >> newFilter [ " Answer a Filter object over the receiver's reader " ^ self resultReader newFilter ] -{ #category : #testing } +{ #category : 'testing' } BioResultObject >> notEmpty [ "Answer whether the receiver contains any elements." ^ self result notNil and: [ self contents notEmpty ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioResultObject >> project [ " Answer the receiver's project - See class comments for details " ^ project ] -{ #category : #accessing } +{ #category : 'accessing' } BioResultObject >> project: aBioProject [ " Set the receiver's project - See class comments for details " project := aBioProject ] -{ #category : #accessing } +{ #category : 'accessing' } BioResultObject >> readerClass [ ^ BioBasicReader ] -{ #category : #accessing } +{ #category : 'accessing' } BioResultObject >> result [ " Answer the receiver's result object " ^ result ] -{ #category : #accessing } +{ #category : 'accessing' } BioResultObject >> result: anObject [ result := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioResultObject >> resultReader [ ^ result ] -{ #category : #accessing } +{ #category : 'accessing' } BioResultObject >> size [ "Answer how many elements the receiver contains." ^ self result size ] -{ #category : #accessing } +{ #category : 'accessing' } BioResultObject >> status [ " Answer a with the exit status of the receiver " ^ exitStatus ] -{ #category : #accessing } +{ #category : 'accessing' } BioResultObject >> status: aBoolean [ " Set aBoolean as the exit status of the receiver " exitStatus := aBoolean ] -{ #category : #accessing } +{ #category : 'accessing' } BioResultObject >> updater [ ^ updater ] -{ #category : #accessing } +{ #category : 'accessing' } BioResultObject >> updater: anObject [ updater := anObject ] diff --git a/repository/BioTools/BioSIXXSerializer.class.st b/repository/BioTools/BioSIXXSerializer.class.st index b1908d2f..f36904ab 100644 --- a/repository/BioTools/BioSIXXSerializer.class.st +++ b/repository/BioTools/BioSIXXSerializer.class.st @@ -12,26 +12,28 @@ to get the contents at an URL: (BioWebClientEngine for: 'http://www.google.com.ar') httpGet " Class { - #name : #BioSIXXSerializer, - #superclass : #BioSerializationEngine, - #category : #'BioTools-Adapters' + #name : 'BioSIXXSerializer', + #superclass : 'BioSerializationEngine', + #category : 'BioTools-Adapters', + #package : 'BioTools', + #tag : 'Adapters' } -{ #category : #accessing } +{ #category : 'accessing' } BioSIXXSerializer class >> providerClass [ " See superimplementor's comment " ^ #SixxReadStream ] -{ #category : #'initialize-release' } +{ #category : 'initialize-release' } BioSIXXSerializer >> initializeWith: aProviderClass [ " Private - See superimplementor's comment " super initializeWith: aProviderClass newDefault ] -{ #category : #accessing } +{ #category : 'accessing' } BioSIXXSerializer >> materialize [ " See superimplementor comment " @@ -44,7 +46,7 @@ BioSIXXSerializer >> materialize [ ^ object. ] -{ #category : #accessing } +{ #category : 'accessing' } BioSIXXSerializer >> serialize: anObject [ " See superimplementor's comment " "anObject sixxString" diff --git a/repository/BioTools/BioSTRSequence.class.st b/repository/BioTools/BioSTRSequence.class.st index 3d2328ea..4668d4ed 100644 --- a/repository/BioTools/BioSTRSequence.class.st +++ b/repository/BioTools/BioSTRSequence.class.st @@ -12,12 +12,14 @@ https://tools.thermofisher.com/content/sfs/manuals/cms_042039.pdf " Class { - #name : #BioSTRSequence, - #superclass : #BioRepeatSequence, - #category : #'BioTools-Repeats' + #name : 'BioSTRSequence', + #superclass : 'BioRepeatSequence', + #category : 'BioTools-Repeats', + #package : 'BioTools', + #tag : 'Repeats' } -{ #category : #examples } +{ #category : 'examples' } BioSTRSequence class >> example01 [ ^ self new @@ -26,7 +28,7 @@ BioSTRSequence class >> example01 [ yourself. ] -{ #category : #examples } +{ #category : 'examples' } BioSTRSequence class >> example02 [ ^ self new @@ -38,7 +40,7 @@ BioSTRSequence class >> example02 [ inspect ] -{ #category : #examples } +{ #category : 'examples' } BioSTRSequence class >> example03 [ ^ self new @@ -49,63 +51,63 @@ BioSTRSequence class >> example03 [ inspect ] -{ #category : #defaults } +{ #category : 'defaults' } BioSTRSequence >> defaultMaxMotifSize [ " Microsatellite definition at the US National Library of Medicine Medical Subject Headings (MeSH) " ^ 5 ] -{ #category : #defaults } +{ #category : 'defaults' } BioSTRSequence >> defaultMinMotifSize [ " Microsatellite definition at the US National Library of Medicine Medical Subject Headings (MeSH) " ^ 2 ] -{ #category : #testing } +{ #category : 'testing' } BioSTRSequence >> isDiNucleotide [ " Answer if receiver is a di-nucleotide sequence " ^ self notEmpty and: [ self repeats = 2 ] ] -{ #category : #testing } +{ #category : 'testing' } BioSTRSequence >> isMonoNucleotide [ " Answer if receiver is all the same letter " ^ self notEmpty and: [ self repeats = 1 ] ] -{ #category : #testing } +{ #category : 'testing' } BioSTRSequence >> isPentaNucleotide [ " Answer if receiver is a penta-nucleotide sequence " ^ self notEmpty and: [ self repeats = 5 ] ] -{ #category : #testing } +{ #category : 'testing' } BioSTRSequence >> isSTRSequence [ " Answer if the receiver represents a STR sequence " ^ true ] -{ #category : #testing } +{ #category : 'testing' } BioSTRSequence >> isTetraNucleotide [ " Answer if receiver is a tetra-nucleotide sequence " ^ self notEmpty and: [ self repeats = 4 ] ] -{ #category : #testing } +{ #category : 'testing' } BioSTRSequence >> isTriNucleotide [ " Answer if receiver is a tri-nucleotide sequence " ^ self notEmpty and: [ self repeats = 3 ] ] -{ #category : #printing } +{ #category : 'printing' } BioSTRSequence >> printMotifOn: aStream [ self motif notNil @@ -115,7 +117,7 @@ BioSTRSequence >> printMotifOn: aStream [ nextPutAll: self repeats asString ] ] -{ #category : #printing } +{ #category : 'printing' } BioSTRSequence >> printOn: aStream [ " Private - See superimplementor's comment " diff --git a/repository/BioTools/BioSatelliteSequence.class.st b/repository/BioTools/BioSatelliteSequence.class.st index 2bbe1cfd..e655b29d 100644 --- a/repository/BioTools/BioSatelliteSequence.class.st +++ b/repository/BioTools/BioSatelliteSequence.class.st @@ -1,22 +1,24 @@ Class { - #name : #BioSatelliteSequence, - #superclass : #BioRepeatSequence, - #category : 'BioTools-Repeats' + #name : 'BioSatelliteSequence', + #superclass : 'BioRepeatSequence', + #category : 'BioTools-Repeats', + #package : 'BioTools', + #tag : 'Repeats' } -{ #category : #defaults } +{ #category : 'defaults' } BioSatelliteSequence >> defaultMaxMotifSize [ ^ 6500 ] -{ #category : #defaults } +{ #category : 'defaults' } BioSatelliteSequence >> defaultMinMotifSize [ ^ 100 ] -{ #category : #testing } +{ #category : 'testing' } BioSatelliteSequence >> isSatelliteSequence [ " Answer if the receiver represents a classic satellite sequence " diff --git a/repository/BioTools/BioSeqAnnotation.class.st b/repository/BioTools/BioSeqAnnotation.class.st index cccfcef9..d125497a 100644 --- a/repository/BioTools/BioSeqAnnotation.class.st +++ b/repository/BioTools/BioSeqAnnotation.class.st @@ -5,20 +5,22 @@ The difference between an Annotation and a Sequence Feature is that a (sequence) " Class { - #name : #BioSeqAnnotation, - #superclass : #BioNamedObject, + #name : 'BioSeqAnnotation', + #superclass : 'BioNamedObject', #instVars : [ 'contents' ], - #category : #'BioTools-Sequences' + #category : 'BioTools-Sequences', + #package : 'BioTools', + #tag : 'Sequences' } -{ #category : #accessing } +{ #category : 'accessing' } BioSeqAnnotation >> contents [ ^ contents ] -{ #category : #accessing } +{ #category : 'accessing' } BioSeqAnnotation >> contents: anObject [ contents := anObject ] diff --git a/repository/BioTools/BioSeqQuality.class.st b/repository/BioTools/BioSeqQuality.class.st index ccdcc311..bb0d5b2b 100644 --- a/repository/BioTools/BioSeqQuality.class.st +++ b/repository/BioTools/BioSeqQuality.class.st @@ -6,38 +6,40 @@ Instance Variables: trace " Class { - #name : #BioSeqQuality, - #superclass : #BioSequence, + #name : 'BioSeqQuality', + #superclass : 'BioSequence', #instVars : [ 'qual', 'trace' ], - #category : #'BioTools-Sequences' + #category : 'BioTools-Sequences', + #package : 'BioTools', + #tag : 'Sequences' } -{ #category : #accessing } +{ #category : 'accessing' } BioSeqQuality >> qual [ ^ qual ] -{ #category : #accessing } +{ #category : 'accessing' } BioSeqQuality >> qual: anObject [ qual := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioSeqQuality >> qualText [ " Answer a representation of meta data " ^ qual ] -{ #category : #accessing } +{ #category : 'accessing' } BioSeqQuality >> trace [ ^ trace ] -{ #category : #accessing } +{ #category : 'accessing' } BioSeqQuality >> trace: anObject [ trace := anObject ] diff --git a/repository/BioTools/BioSeqRecord.class.st b/repository/BioTools/BioSeqRecord.class.st index c44b1f14..f15c522f 100644 --- a/repository/BioTools/BioSeqRecord.class.st +++ b/repository/BioTools/BioSeqRecord.class.st @@ -4,8 +4,8 @@ BioSeqRecord stores a sequence with additional information, this is usually call " Class { - #name : #BioSeqRecord, - #superclass : #BioNamedObject, + #name : 'BioSeqRecord', + #superclass : 'BioNamedObject', #instVars : [ 'seq', 'header', @@ -17,24 +17,26 @@ Class { 'annotationsClass', 'sequenceFeaturesClass' ], - #category : #'BioTools-Sequences' + #category : 'BioTools-Sequences', + #package : 'BioTools', + #tag : 'Sequences' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioSeqRecord class >> new: aBioSequence [ " Answer a new instance of the receiver setting aBioSequence " ^ self new initializeWith: aBioSequence ] -{ #category : #'accessing-sequence' } +{ #category : 'accessing-sequence' } BioSeqRecord >> , aBioSeqRecord [ " Concatenate the receiver's sequences with aBioSeqRecord if their sequences are compatible. Answer the receiver " self sequence: self sequence , aBioSeqRecord sequence ] -{ #category : #comparing } +{ #category : 'comparing' } BioSeqRecord >> = anObject [ " Answer whether the receiver and anObject represent the same object. " @@ -47,14 +49,14 @@ BioSeqRecord >> = anObject [ ^ true ] -{ #category : #'accessing - sequence features' } +{ #category : 'accessing - sequence features' } BioSeqRecord >> addSeqFeature: aBioSequenceFeature [ " Attach aBioSequenceFeature to the receiver " self sequenceFeatures add: aBioSequenceFeature. ] -{ #category : #'accessing - sequence annotations' } +{ #category : 'accessing - sequence annotations' } BioSeqRecord >> annotations [ " Answer a with receiver's annotations " @@ -62,33 +64,33 @@ BioSeqRecord >> annotations [ ifNil: [ annotations := self annotationsClass new ] ] -{ #category : #'accessing - sequence annotations' } +{ #category : 'accessing - sequence annotations' } BioSeqRecord >> annotations: anObject [ annotations := anObject ] -{ #category : #'accessing - sequence annotations' } +{ #category : 'accessing - sequence annotations' } BioSeqRecord >> annotationsAt: aKey [ " Get annotations at aKey in the receiver's annotations " ^ self annotations at: aKey ] -{ #category : #'accessing - sequence annotations' } +{ #category : 'accessing - sequence annotations' } BioSeqRecord >> annotationsAt: aKey ifAbsent: absentBlock [ " Get annotations at aKey in the receiver's annotations " ^ self annotations at: aKey ifAbsent: absentBlock ] -{ #category : #'accessing - sequence annotations' } +{ #category : 'accessing - sequence annotations' } BioSeqRecord >> annotationsAt: aKey put: aValue [ " Set aValue annotation at aKey in the receiver's annotations " ^ self annotations at: aKey put: aValue ] -{ #category : #'accessing - sequence annotations' } +{ #category : 'accessing - sequence annotations' } BioSeqRecord >> annotationsClass [ " Answer a class used to store the receiver's annotations " @@ -96,114 +98,114 @@ BioSeqRecord >> annotationsClass [ ifNil: [ annotationsClass := self defaultAnnotationsClass ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioSeqRecord >> annotationsClass: anObject [ ^ annotationsClass := anObject ] -{ #category : #'accessing-sequence' } +{ #category : 'accessing-sequence' } BioSeqRecord >> copySeqFrom: startInteger [ " See comment in BioSequence. Answer the receiver " self sequence: (self sequence copyFrom: startInteger) ] -{ #category : #'accessing-sequence' } +{ #category : 'accessing-sequence' } BioSeqRecord >> copySeqTo: stopInteger [ " See comment in BioSequence. Answer the receiver " self sequence: (self sequence copyTo: stopInteger) ] -{ #category : #accessing } +{ #category : 'accessing' } BioSeqRecord >> dbxRefs [ ^ dbxRefs ] -{ #category : #accessing } +{ #category : 'accessing' } BioSeqRecord >> dbxRefs: anObject [ dbxRefs := anObject ] -{ #category : #defaults } +{ #category : 'defaults' } BioSeqRecord >> defaultAnnotationsClass [ " Answer the default class used to store the receiver's annotations " ^ Dictionary ] -{ #category : #defaults } +{ #category : 'defaults' } BioSeqRecord >> defaultSequenceFeaturesClass [ " Answer the default used to store the receiver's sequence features " ^ OrderedCollection ] -{ #category : #'accessing-sequence' } +{ #category : 'accessing-sequence' } BioSeqRecord >> description [ ^ description ] -{ #category : #'accessing-sequence' } +{ #category : 'accessing-sequence' } BioSeqRecord >> description: anObject [ description := anObject ] -{ #category : #'accessing - sequence features' } +{ #category : 'accessing - sequence features' } BioSeqRecord >> features [ " See comment in sequenceFeatures " ^ self sequenceFeatures ] -{ #category : #'accessing - sequence features' } +{ #category : 'accessing - sequence features' } BioSeqRecord >> features: anObject [ sequenceFeatures := anObject ] -{ #category : #comparing } +{ #category : 'comparing' } BioSeqRecord >> hash [ " Private - hash is implemented because #= is implemented " ^ self sequence hash bitXor: self id hash ] -{ #category : #'accessing-sequence' } +{ #category : 'accessing-sequence' } BioSeqRecord >> header [ " Answer a with receiver's information " ^ header ] -{ #category : #'accessing-sequence' } +{ #category : 'accessing-sequence' } BioSeqRecord >> header: aString [ " Set the receiver's basic description information to aString" header := aString ] -{ #category : #'accessing-sequence' } +{ #category : 'accessing-sequence' } BioSeqRecord >> id [ " Answer the receiver's identifier " ^ self name ] -{ #category : #'accessing-sequence' } +{ #category : 'accessing-sequence' } BioSeqRecord >> id: aString [ " Set the receiver's identifier to be anObject " self name: aString ] -{ #category : #'initialize-release' } +{ #category : 'initialize-release' } BioSeqRecord >> initializeWith: aBioSequence [ " Private - Initialize the receiver's sequence " seq := aBioSequence ] -{ #category : #'accessing - sequence annotations' } +{ #category : 'accessing - sequence annotations' } BioSeqRecord >> letterAnnotations [ " Answer a with per-letter annotations. " @@ -211,7 +213,7 @@ BioSeqRecord >> letterAnnotations [ ifNil: [ letterAnnotations := (self letterAnnotationsClass new: self sequence size) yourself ] ] -{ #category : #'accessing - sequence annotations' } +{ #category : 'accessing - sequence annotations' } BioSeqRecord >> letterAnnotations: aDictionary [ " Set the receiver's per-letter annotations to be aDictionary " @@ -219,14 +221,14 @@ BioSeqRecord >> letterAnnotations: aDictionary [ ] -{ #category : #'accessing - sequence annotations' } +{ #category : 'accessing - sequence annotations' } BioSeqRecord >> letterAnnotationsAt: aKey [ " Answer the receiver's per-letter annotation for the sequence at aKey " ^ self letterAnnotations at: aKey ] -{ #category : #'accessing - sequence annotations' } +{ #category : 'accessing - sequence annotations' } BioSeqRecord >> letterAnnotationsAt: aKey put: aCollection [ " At aKey add aCollection to the receiver's per-letter annotation for the sequence. aCollection must match the length of the receiver's sequence length " @@ -235,62 +237,62 @@ BioSeqRecord >> letterAnnotationsAt: aKey put: aCollection [ ifFalse: [ self signalInvalidObject: 'Unmatched letter annotations length and sequence length' translated ]. ] -{ #category : #'accessing - sequence annotations' } +{ #category : 'accessing - sequence annotations' } BioSeqRecord >> letterAnnotationsClass [ ^ Dictionary ] -{ #category : #'accessing - sequence annotations' } +{ #category : 'accessing - sequence annotations' } BioSeqRecord >> removeAnnotations [ " Completely remove all the annotations from the receiver " self annotations: self annotationsClass new ] -{ #category : #'accessing - sequence annotations' } +{ #category : 'accessing - sequence annotations' } BioSeqRecord >> removeAnnotationsAt: key [ " Remove key from the receiver. If key is not in the receiver, notify an error." ^ self annotations removeKey: key ] -{ #category : #'accessing - sequence annotations' } +{ #category : 'accessing - sequence annotations' } BioSeqRecord >> removeLetterAnnotations [ " Completely remove all the letter annotations from the receiver " self letterAnnotations: self letterAnnotationsClass new ] -{ #category : #'accessing - sequence annotations' } +{ #category : 'accessing - sequence annotations' } BioSeqRecord >> removeLetterAnnotationsAt: key [ " Remove key from the receiver. If key is not in the receiver, notify an error. " ^ self letterAnnotations removeKey: key ] -{ #category : #'accessing - sequence features' } +{ #category : 'accessing - sequence features' } BioSeqRecord >> removeSeqFeature: aBioSequenceFeature [ " Remove aBioSequenceFeature from the receiver " self sequenceFeatures remove: aBioSequenceFeature ] -{ #category : #'accessing-sequence' } +{ #category : 'accessing-sequence' } BioSeqRecord >> sequence [ " Answer the receiver's . " ^ seq ] -{ #category : #'accessing-sequence' } +{ #category : 'accessing-sequence' } BioSeqRecord >> sequence: aBioSequence [ " Set the receiver's sequence to be aBioSequence " seq := aBioSequence ] -{ #category : #'accessing - sequence features' } +{ #category : 'accessing - sequence features' } BioSeqRecord >> sequenceFeatures [ " Answer the receiver's sequence features object " @@ -298,14 +300,14 @@ BioSeqRecord >> sequenceFeatures [ ifNil: [ sequenceFeatures := self sequenceFeaturesClass new ] ] -{ #category : #'accessing - sequence features' } +{ #category : 'accessing - sequence features' } BioSeqRecord >> sequenceFeatures: aCollection [ " Set the receiver's sequence feature to be aCollection " sequenceFeatures := aCollection ] -{ #category : #'accessing - sequence features' } +{ #category : 'accessing - sequence features' } BioSeqRecord >> sequenceFeaturesClass [ " Private - Answer the used to store sequence features " diff --git a/repository/BioTools/BioSequence.class.st b/repository/BioTools/BioSequence.class.st index e9ed1ce6..05fabccc 100644 --- a/repository/BioTools/BioSequence.class.st +++ b/repository/BioTools/BioSequence.class.st @@ -11,8 +11,8 @@ Instance Variables: " Class { - #name : #BioSequence, - #superclass : #BioObject, + #name : 'BioSequence', + #superclass : 'BioObject', #instVars : [ 'seq', 'alphabet', @@ -21,10 +21,12 @@ Class { 'gcContent', 'gcSkew' ], - #category : #'BioTools-Sequences' + #category : 'BioTools-Sequences', + #package : 'BioTools', + #tag : 'Sequences' } -{ #category : #'accessing - disambiguation' } +{ #category : 'accessing - disambiguation' } BioSequence class >> disambiguateLetter: letter [ " Private - Answer a of disambiguations for letter " @@ -33,7 +35,7 @@ BioSequence class >> disambiguateLetter: letter [ ifAbsent: [ letter asString ] ] -{ #category : #convenience } +{ #category : 'convenience' } BioSequence class >> expected: m probabilitySeqOfSize: n patternLength: k alphabetSize: a occurrences: t [ " Answer a representing the expected k-mer occurrences in m (random) strings of length n formed from an alphabet of a letters. n = Length of each String. @@ -45,7 +47,7 @@ BioSequence class >> expected: m probabilitySeqOfSize: n patternLength: k alphab ^ ((n - (t * (k - 1)) choose: t) / (a raisedTo: (t * k))) asFloat * m ] -{ #category : #'instance creation - dna' } +{ #category : 'instance creation - dna' } BioSequence class >> forAlphabet: aBioAlphabetClass [ " Answer a new instance of the receiver with aBioAlphabetClass as its alphabet " @@ -54,21 +56,21 @@ BioSequence class >> forAlphabet: aBioAlphabetClass [ yourself ] -{ #category : #'instance creation - dna' } +{ #category : 'instance creation - dna' } BioSequence class >> fromUmambiguousDNASequences: aCollection [ " Answer a of receivers taking each from aCollection " ^ aCollection collect: [ : seqString | self newUnambiguousDNA: seqString ] ] -{ #category : #'instance creation - rna' } +{ #category : 'instance creation - rna' } BioSequence class >> fromUmambiguousRNASequences: aCollection [ " Answer a of receivers taking each from aCollection " ^ aCollection collect: [ : seqString | self newUnambiguousRNA: seqString ] ] -{ #category : #convenience } +{ #category : 'convenience' } BioSequence class >> joinSequence: aCollection [ " Private - Answer a String with the sequence ensambled from aCollection. aCollection is a collection of collections with each element composed by @@ -77,7 +79,7 @@ BioSequence class >> joinSequence: aCollection [ ^ (aCollection flatCollect: [ : each | each select: #isBiologicalSequence ]) joinUsing: String empty ] -{ #category : #convenience } +{ #category : 'convenience' } BioSequence class >> joinString: aCollection [ " Private - Answer a String with the sequence ensambled from aCollection. aCollection is a collection of collections with each element composed by @@ -86,7 +88,7 @@ BioSequence class >> joinString: aCollection [ ^ (aCollection flatCollect: [ : each | each select: #isString ]) joinUsing: String empty ] -{ #category : #'instance creation - dna' } +{ #category : 'instance creation - dna' } BioSequence class >> newAmbiguousDNA: aString [ " Answer a new instance of the receiver with aString as its sequence " @@ -95,7 +97,7 @@ BioSequence class >> newAmbiguousDNA: aString [ alphabet: BioIUPACAmbiguousDNA new ] -{ #category : #'instance creation - dna' } +{ #category : 'instance creation - dna' } BioSequence class >> newAmbiguousDNA: aString named: aName [ " Answer a new instance of the receiver with aString as the sequence " @@ -106,7 +108,7 @@ BioSequence class >> newAmbiguousDNA: aString named: aName [ yourself ] -{ #category : #'instance creation - rna' } +{ #category : 'instance creation - rna' } BioSequence class >> newAmbiguousRNA: aString [ " Answer a new instance of the receiver with aString as the sequence string " @@ -115,14 +117,14 @@ BioSequence class >> newAmbiguousRNA: aString [ alphabet: BioIUPACAmbiguousRNA new ] -{ #category : #'instance creation - dna' } +{ #category : 'instance creation - dna' } BioSequence class >> newDNA: aString [ " Answer a new instance of the receiver with aString as the sequence " ^ self newUnambiguousDNA: aString ] -{ #category : #'instance creation - dna' } +{ #category : 'instance creation - dna' } BioSequence class >> newDNANamed: aString [ " Answer a new instance of the receiver with aString as its name " @@ -132,14 +134,14 @@ BioSequence class >> newDNANamed: aString [ yourself ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioSequence class >> newFrom: aPath [ " Answer a new instance of the receiver reading from aPath " ^ self new initializeFrom: aPath ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioSequence class >> newNamed: aNameString [ " Answer a new instance of the receiver named aNameString. No alphabet is guessed " @@ -148,7 +150,7 @@ BioSequence class >> newNamed: aNameString [ yourself ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioSequence class >> newNamed: aNameString sequence: aSeqString [ " Answer a new instance of the receiver using aString as sequence. Alphabet is guessed from aSeqString " @@ -158,7 +160,7 @@ BioSequence class >> newNamed: aNameString sequence: aSeqString [ yourself ] -{ #category : #'instance creation - protein' } +{ #category : 'instance creation - protein' } BioSequence class >> newProtein: aString [ " Answer a new instance of the receiver with aString as its protein sequence string " @@ -167,7 +169,7 @@ BioSequence class >> newProtein: aString [ alphabet: BioIUPACProtein new ] -{ #category : #'instance creation - protein' } +{ #category : 'instance creation - protein' } BioSequence class >> newProtein: aString named: aName [ " Answer a new instance of the receiver with aString as the sequence " @@ -177,7 +179,7 @@ BioSequence class >> newProtein: aString named: aName [ yourself ] -{ #category : #'instance creation - protein' } +{ #category : 'instance creation - protein' } BioSequence class >> newProteinExtended: aString [ " Answer a new instance of the receiver with aString as its protein sequence string " @@ -186,7 +188,7 @@ BioSequence class >> newProteinExtended: aString [ alphabet: BioIUPACProteinExtended new ] -{ #category : #'instance creation - protein' } +{ #category : 'instance creation - protein' } BioSequence class >> newProteinNamed: aString [ " Answer a new instance of the receiver with aString as its name " @@ -196,14 +198,14 @@ BioSequence class >> newProteinNamed: aString [ yourself ] -{ #category : #'instance creation - rna' } +{ #category : 'instance creation - rna' } BioSequence class >> newRNA: aString [ " Answer a new instance of the receiver with aString as its sequence " ^ self newUnambiguousRNA: aString ] -{ #category : #'instance creation - rna' } +{ #category : 'instance creation - rna' } BioSequence class >> newRNANamed: aString [ " Answer a new instance of the receiver with aString as its name " @@ -213,7 +215,7 @@ BioSequence class >> newRNANamed: aString [ yourself ] -{ #category : #'instance creation - dna' } +{ #category : 'instance creation - dna' } BioSequence class >> newUnambiguousDNA: aString [ " Answer a new instance of the receiver with aString as its sequence " @@ -222,7 +224,7 @@ BioSequence class >> newUnambiguousDNA: aString [ alphabet: BioIUPACUnambiguousDNA new ] -{ #category : #'instance creation - rna' } +{ #category : 'instance creation - rna' } BioSequence class >> newUnambiguousRNA: aString [ " Answer a new instance of the receiver with aString as its sequence string " @@ -231,14 +233,14 @@ BioSequence class >> newUnambiguousRNA: aString [ alphabet: BioIUPACUnambiguousRNA new ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioSequence class >> newWith: aString [ " Answer a new instance of the receiver using aString as sequence. Alphabet is guessed " ^ self new initializeWith: aString ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioSequence class >> newWith: aString alphabet: aBioAlphabet [ " Answer a new instance of the receiver with aString as the sequence and anAlphabet as the alphabet for the sequence " @@ -253,7 +255,7 @@ BioSequence class >> newWith: aString alphabet: aBioAlphabet [ alphabet: aBioAlphabet ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> , aBioSequence [ " Concatenate the receiver with aBioSequence if their alphabets are compatible " @@ -266,14 +268,14 @@ BioSequence >> , aBioSequence [ ifTrue: [ self newPrototypeWith: self asString , aBioSequence asString ] ] -{ #category : #comparing } +{ #category : 'comparing' } BioSequence >> <= aBioSequence [ " Answer whether the receiver size is less than the argument " ^ self size <= aBioSequence size ] -{ #category : #comparing } +{ #category : 'comparing' } BioSequence >> = anObject [ "Answer whether the receiver and anObject represent the same object." @@ -284,28 +286,28 @@ BioSequence >> = anObject [ ^ self asString = anObject asString and: [ alphabet = anObject alphabet ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> accessionName [ " Answer a representing the receiver's accession number, if available. Otherwise answer an empty string " ^ self sequenceRecord name ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> accessionName: aString [ " Set aString to represent the receiver's accession number " ^ self sequenceRecord name: aString ] -{ #category : #'accessing - sequence record' } +{ #category : 'accessing - sequence record' } BioSequence >> addSeqFeature: aBioSequenceFeature [ " Attach aBioSequenceFeature to the receiver " self sequenceRecord addSeqFeature: aBioSequenceFeature. ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> addToAlignment: aBioAlignment [ " Add the receiver to the alignment aBioAlignment " @@ -316,7 +318,7 @@ BioSequence >> addToAlignment: aBioAlignment [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> addToAlignment: aBioAlignment named: seqName [ " Add the receiver to the alignment aBioAlignment " @@ -326,21 +328,21 @@ BioSequence >> addToAlignment: aBioAlignment named: seqName [ yourself ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> allButFirst [ " Answer a copy of the receiver containing all but the first element. Raise an error if there are not enough elements." ^ self newPrototypeWith: self sequence allButFirst ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> allButLast [ " Answer a copy of the receiver containing all but the last element. Raise an error if there are not enough elements." ^ self newPrototypeWith: self sequence allButLast ] -{ #category : #'accessing - alphabet' } +{ #category : 'accessing - alphabet' } BioSequence >> alphabet [ " Answer a representing the receiver's sequence alphabet " @@ -348,28 +350,28 @@ BioSequence >> alphabet [ ifNil: [ alphabet := self defaultAlphabetClass new ] ] -{ #category : #'accessing - alphabet' } +{ #category : 'accessing - alphabet' } BioSequence >> alphabet: aBioAlphabet [ " Set aBioAlphabet as receiver's alphabet " alphabet := aBioAlphabet ] -{ #category : #'accessing - alphabet' } +{ #category : 'accessing - alphabet' } BioSequence >> alphabetCodes [ " Answer a sorted with receiver's codes " ^ self alphabet codes sorted ] -{ #category : #'accessing public - utils' } +{ #category : 'accessing public - utils' } BioSequence >> ambiguityCodes [ " Answer a with the ambiguity codes for the receiver's alphabet " ^ self alphabet ambiguityCodes ] -{ #category : #'accesing public - protein synthesis' } +{ #category : 'accesing public - protein synthesis' } BioSequence >> aminoacidNames [ " Answer a with receiver's letters as aminoacid names " @@ -381,7 +383,7 @@ BioSequence >> aminoacidNames [ ^ aminoacidNames ] -{ #category : #converting } +{ #category : 'converting' } BioSequence >> asFastaRecord [ " Answer a filled with the receiver's name and sequence " @@ -390,14 +392,14 @@ BioSequence >> asFastaRecord [ sequence: seq ] -{ #category : #converting } +{ #category : 'converting' } BioSequence >> asLowercase [ " Modify the receiver with its sequence with characters all lowercased " seq := seq asLowercase ] -{ #category : #converting } +{ #category : 'converting' } BioSequence >> asMutableSequence [ " Answer a copy of the receiver converted to a mutable object " @@ -407,7 +409,7 @@ BioSequence >> asMutableSequence [ ] -{ #category : #converting } +{ #category : 'converting' } BioSequence >> asNumber [ " Interpret the receiver as a k-mer pattern and answer the at the index array defined by the receiver's size (PatternToNumber) " @@ -425,7 +427,7 @@ BioSequence >> asNumber [ ] -{ #category : #converting } +{ #category : 'converting' } BioSequence >> asSequence [ " Answer the receiver " @@ -433,7 +435,7 @@ BioSequence >> asSequence [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> asSequenceForAlphabet: anAlphabet [ " Answer the receiver " @@ -441,21 +443,21 @@ BioSequence >> asSequenceForAlphabet: anAlphabet [ ] -{ #category : #converting } +{ #category : 'converting' } BioSequence >> asString [ " Answer a with the receiver's sequence " ^ seq trimBoth withoutCRs ] -{ #category : #converting } +{ #category : 'converting' } BioSequence >> asUppercase [ " Modify the receiver with its sequence with characters all uppercased " seq := seq asUppercase ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> at: anInteger [ " Access the receiver's element at anInteger position " @@ -464,14 +466,14 @@ BioSequence >> at: anInteger [ ifAbsent: [ self signalInvalidObject: 'Out of range exception' ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> at: anInteger put: aLetter [ " Store aLetter in the position of the receiver indicated by the anInteger. Answer the receiver " self signalInvalidObject: 'Sequence is read-only. Use #asMutable to enable modifications it then #asSequence' ] -{ #category : #'accesing public - protein synthesis' } +{ #category : 'accesing public - protein synthesis' } BioSequence >> backTranscribe [ " Answer a new instance of the receiver's with the receiver's sequence transcribed to its corresponding DNA, adjusting the alphabet " @@ -481,7 +483,7 @@ BioSequence >> backTranscribe [ ] -{ #category : #'accessing private - protein synthesis' } +{ #category : 'accessing private - protein synthesis' } BioSequence >> backTranscription [ " Answer a String with the back transcription of the receiver's sequence " @@ -492,14 +494,14 @@ BioSequence >> backTranscription [ ^ backTranscript ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> bioConsensusFor: aBioAlignment [ " Answer a representing a consensus base for the receiver " ^ aBioAlignment consensusStrategy consensusAt: self asString asUppercase ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> buildFrequencies: k [ " Generates a frequency array by first initializing every element in the frequency array to zero (4k operations) and then making a single pass down receiver's sequence (approximately |sequence size| · k operations). For each k-mer Pattern that we encounter, we add 1 to the value of the frequency array corresponding to Pattern " @@ -512,7 +514,7 @@ BioSequence >> buildFrequencies: k [ ^ freqArray ] -{ #category : #testing } +{ #category : 'testing' } BioSequence >> canTranslate [ " Answer if a sequence can be translated using the receiver " @@ -533,7 +535,7 @@ BioSequence >> canTranslate [ ^ true ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> clumpFindK: k length: l times: t [ " Given integers L and t, a string Pattern forms an (L, t)-clump inside a (larger) string Genome if there is an interval of Genome of length L in which Pattern appears at least t times. This method search for the k-mer pattern in the receiver, appearing at least t times in a l window size. Answer a " @@ -551,21 +553,21 @@ BioSequence >> clumpFindK: k length: l times: t [ ^ sequences ] -{ #category : #'accesing public - protein synthesis' } +{ #category : 'accesing public - protein synthesis' } BioSequence >> codonTables [ " Answer the appropriate for the receiver " ^ self alphabet codonTable ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> complement [ " Answer a new instance of the receiver's with the complement of the receiver's sequence " ^ self newPrototypeWith: self complementary ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> complementary [ " Answer a String with the complement of the receiver's sequence " @@ -573,21 +575,21 @@ BioSequence >> complementary [ seq do: [ : nc | stream nextPut: (self complementaryAt: nc) ] ] ] -{ #category : #'accessing private' } +{ #category : 'accessing private' } BioSequence >> complementaryAt: aCharacter [ " Private - Answer a with the receiver's complement for aCharacter " ^ self alphabet complementaryTable at: aCharacter ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> contents [ " Compatibility with #dumpToFileNamed: . Answer the receiver's sequence " ^ self sequence. ] -{ #category : #copying } +{ #category : 'copying' } BioSequence >> copyFrom: startInteger [ " Answer a copy of the receiver sliced from startInteger position up to the last position. The startInteger and endInteger are inclusive, i.e. #copyFrom: 1 to: 2 answer the first two bases of the sequence. " @@ -597,7 +599,7 @@ BioSequence >> copyFrom: startInteger [ ] -{ #category : #copying } +{ #category : 'copying' } BioSequence >> copyFrom: startInteger to: endInteger [ " Answer a copy of the receiver sliced from startInteger position up to endInteger position. The startInteger and endInteger are inclusive, i.e. #copyFrom: 1 to: 2 answer the first two bases of the sequence. " @@ -608,7 +610,7 @@ BioSequence >> copyFrom: startInteger to: endInteger [ ] -{ #category : #copying } +{ #category : 'copying' } BioSequence >> copyTo: stopInteger [ " Answer a copy of the receiver sliced from the first position up to the stopInteger position. The startInteger and endInteger are inclusive, i.e. #copyFrom: 1 to: 2 answer the first two bases of the sequence. " @@ -618,20 +620,20 @@ BioSequence >> copyTo: stopInteger [ ] -{ #category : #'accessing - checksum' } +{ #category : 'accessing - checksum' } BioSequence >> crc32 [ "Answer a with the CRC checksum (edundancy check) for the receiver's sequence" ^ CRC crc32FromCollection: self asString ] -{ #category : #'accessing private' } +{ #category : 'accessing private' } BioSequence >> defaultAlphabetClass [ ^ BioAlphabet ] -{ #category : #converting } +{ #category : 'converting' } BioSequence >> degenerateBasesAsMultibases [ " Answer a converting the receiver's degenerate bases in IUPAC notation to non-degenerate codes in the form [G/C] for S for example " @@ -649,7 +651,7 @@ BioSequence >> degenerateBasesAsMultibases [ ] -{ #category : #'accessing - disambiguation' } +{ #category : 'accessing - disambiguation' } BioSequence >> dfsExpandSeq: currentDFSNode cumSequences: cumList [ currentDFSNode beVisited. @@ -672,7 +674,7 @@ BioSequence >> dfsExpandSeq: currentDFSNode cumSequences: cumList [ ] -{ #category : #'accessing - disambiguation' } +{ #category : 'accessing - disambiguation' } BioSequence >> disambiguate [ " Answer a with receiver's sequence disambiguated using IUPAC ambiguity codes " | expandedList startNode | @@ -683,7 +685,7 @@ BioSequence >> disambiguate [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> do: aClosure [ " Evaluate aBlock with each of the receiver's elements as the argument. " @@ -691,7 +693,7 @@ BioSequence >> do: aClosure [ ] -{ #category : #copying } +{ #category : 'copying' } BioSequence >> findHotspots [ " Answer a of the receiver's substrings tokenized by hostspots : [ ] " @@ -700,7 +702,7 @@ BioSequence >> findHotspots [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> from: start to: stop do: aClosure [ " Evaluate aBlock for all elements between start and stop (inclusive). " @@ -708,7 +710,7 @@ BioSequence >> from: start to: stop do: aClosure [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> gcContent [ " Answer a representing the GC-content of a DNA string: the percentage of symbols in the string that are 'C' or 'G' " @@ -718,12 +720,12 @@ BioSequence >> gcContent [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> gcContent: anObject [ gcContent := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> gcContentCalc [ " Answer a representing the GC-content of a DNA string: the percentage of symbols in the string that are 'C' or 'G' " | cCount gCount | @@ -739,7 +741,7 @@ BioSequence >> gcContentCalc [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> gcContentStep: step window: w [ " Answer a of GC-content regions of window size w by step increments, in percentages. " @@ -763,7 +765,7 @@ BioSequence >> gcContentStep: step window: w [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> gcContentUppercased [ " Answer a representing the GC-content of the receiver: the percentage of symbols in the string that are 'C' or 'G'. Assume the receiver's sequence is already all uppercased " @@ -781,7 +783,7 @@ BioSequence >> gcContentUppercased [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> gcSkew [ " Answer a with ratios . Calculate receiver's GC skew (G-C)/(G+C) for windows of size wLength. Set 0 for windows without any G/C by handling zero division errors. Does NOT look at any ambiguous nucleotides. " @@ -791,12 +793,12 @@ BioSequence >> gcSkew [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> gcSkew: anObject [ gcSkew := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> gcSkewCalc [ " Answer a with ratios . Calculate receiver's GC skew (G-C)/(G+C) for windows of size wLength. Set 0 for windows without any G/C by handling zero division errors. Does NOT look at any ambiguous nucleotides. " @@ -805,7 +807,7 @@ BioSequence >> gcSkewCalc [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> gcSkewCalc: wLength [ " Answer a with representing ratios. Calculate receiver's GC skew (G-C)/(G+C) for windows of size wLength. Answer 0.0 for windows without any G/C by handling zero division errors. Does NOT look at any ambiguous nucleotides. " @@ -831,7 +833,7 @@ BioSequence >> gcSkewCalc: wLength [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> gcSkewInt [ " Answer a with . Calculate receiver's GC skew for each position. Does NOT look at any ambiguous nucleotides. " @@ -847,7 +849,7 @@ BioSequence >> gcSkewInt [ ^ skews ] -{ #category : #'accessing - checksum' } +{ #category : 'accessing - checksum' } BioSequence >> gcg [ "Answer a with the GCG checksum (edundancy check) for the receiver's sequence" @@ -865,7 +867,7 @@ BioSequence >> gcg [ ^ checksum \\ 10000. ] -{ #category : #testing } +{ #category : 'testing' } BioSequence >> hasAmbiguousBases [ " Answer if receiver contains ambiguity codes " @@ -873,7 +875,7 @@ BioSequence >> hasAmbiguousBases [ ] -{ #category : #comparing } +{ #category : 'comparing' } BioSequence >> hash [ " Private - hash is implemented because #= is implemented " @@ -881,21 +883,21 @@ BioSequence >> hash [ ] -{ #category : #copying } +{ #category : 'copying' } BioSequence >> hotspotRegionsLeft: leftSize right: rightSize [ " Answer a with the receiver's subcollections such as the left and right flanking regions of a hostpot are at least leftSize and rightSize respectively " ^ self findHotspots tripleSelect: [ : a : b : c | a size >= leftSize and: [ c size >= rightSize ] ]. ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> indicesOfSubsequence: aBioSequence [ " See comment in #indicesOfSubstring: " ^ self asString indicesOfSubstring: aBioSequence asString ] -{ #category : #'initialize-release' } +{ #category : 'initialize-release' } BioSequence >> initializeAlphabetFrom: aString [ " Private - Set the receiver's alphabet guessing from aString or assigning a default if not possible " @@ -907,7 +909,7 @@ BioSequence >> initializeAlphabetFrom: aString [ self defaultAlphabetClass new ] ] -{ #category : #'initialize-release' } +{ #category : 'initialize-release' } BioSequence >> initializeWith: aString [ " Private - Initialize the receiver's sequence to be aString " @@ -916,7 +918,7 @@ BioSequence >> initializeWith: aString [ ] -{ #category : #'initialize-release' } +{ #category : 'initialize-release' } BioSequence >> initializeWith: aString alphabet: anAlphabet [ " Private - Initialize the receiver's sequence to be aString and anAlphabet. Notice the receiver knows how to instantiate the alphabet " @@ -924,14 +926,14 @@ BioSequence >> initializeWith: aString alphabet: anAlphabet [ alphabet := anAlphabet ] -{ #category : #testing } +{ #category : 'testing' } BioSequence >> isBioSequence [ "Answer whether the receiver represents a Biological sequence." ^ true ] -{ #category : #testing } +{ #category : 'testing' } BioSequence >> isDNASequence [ " Answer if the receiver represents an identifiable biological letter " @@ -939,7 +941,7 @@ BioSequence >> isDNASequence [ ] -{ #category : #testing } +{ #category : 'testing' } BioSequence >> isEmpty [ " Answer if the receiver's sequence string contains no elements " @@ -947,49 +949,49 @@ BioSequence >> isEmpty [ ] -{ #category : #testing } +{ #category : 'testing' } BioSequence >> isMinisatelliteSequence [ " Answer if the receiver represents a STR sequence " ^ false ] -{ #category : #testing } +{ #category : 'testing' } BioSequence >> isNil [ " Answer if receiver's sequence is nil " ^ seq isNil ] -{ #category : #testing } +{ #category : 'testing' } BioSequence >> isProteinSequence [ " Answer if the receiver represents an identifiable biological letter " ^ self alphabet isProtein and: [ seq isProteinSequence ]. ] -{ #category : #testing } +{ #category : 'testing' } BioSequence >> isRNASequence [ " Answer if the receiver represents an identifiable biological letter " ^ seq isRNASequence and: [ self alphabet isRNA ]. ] -{ #category : #testing } +{ #category : 'testing' } BioSequence >> isSTRSequence [ " Answer if the receiver represents a STR sequence " ^ false ] -{ #category : #testing } +{ #category : 'testing' } BioSequence >> isSatelliteSequence [ " Answer if the receiver represents a classic satellite sequence " ^ false ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> kmersCount: patString [ " Answer the number of times that k-mers patString appears as substring of the receiver " @@ -997,14 +999,14 @@ BioSequence >> kmersCount: patString [ (self copyFrom: i to: i + patString size - 1) sequence = patString ]. ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> kmersCount: patString mismatches: d [ " Answer the number of times that k-mers patString appears as substring of the receiver allowing d mismatches " ^ (self sequence indicesOfSubstring: patString mismatches: d) size ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> lcc [ "Answer a of with the Local Composition Complexity (LCC) value for the receiver. Assume the receiver is unambiguous sequence " @@ -1022,7 +1024,7 @@ BioSequence >> lcc [ ^ lccValues ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> lccWSize: wsize [ | l4 compone lccsal window cant_a cant_c cant_t cant_g term_a term_c term_t term_g tail | @@ -1162,14 +1164,14 @@ BioSequence >> lccWSize: wsize [ ^ lccsal. ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> length [ " Answer how many bases contains the receiver " ^ self size ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> longestConsecutive: aCharacter [ " Answer the length of the longest substring containing only letter for each element of aCharacter. @@ -1192,7 +1194,7 @@ BioSequence >> longestConsecutive: aCharacter [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> minGCSkewInt [ " Answer a with all the positions where the GC skew reaches its minimum position " @@ -1204,7 +1206,7 @@ BioSequence >> minGCSkewInt [ ^ minGCs ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> molecularWeightDegen [ | lowerBoundsSequence upperBoundsSequence | @@ -1241,7 +1243,7 @@ BioSequence >> molecularWeightDegen [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> molecularWeightNonDegen [ | dict | @@ -1253,7 +1255,7 @@ BioSequence >> molecularWeightNonDegen [ ((dict at: $C) * 289.18) + 17.01. ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> mostFrequentKmer: k [ " Answer a of receiver with the most frequent k-mers of size k " @@ -1273,7 +1275,7 @@ BioSequence >> mostFrequentKmer: k [ ^ maxKmers. ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> mostFrequentKmer: k mismatches: d [ " Answer a of receiver with the most frequent k-mers of size k allowing mismatches of size d " " Frequent Words with Mismatches Problem @@ -1291,7 +1293,7 @@ BioSequence >> mostFrequentKmer: k mismatches: d [ ^ counter maxElements ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> mostFrequentKmerRevComp: k mismatches: d [ " Answer a of receiver with the most frequent k-mers of size k allowing mismatches of size d " " Frequent Words with Mismatches Problem @@ -1310,19 +1312,19 @@ BioSequence >> mostFrequentKmerRevComp: k mismatches: d [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> name [ ^ name ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> name: anObject [ name := anObject ] -{ #category : #'accessing private' } +{ #category : 'accessing private' } BioSequence >> newPrototypeWith: aString [ " Private - Note that you cannot copy because Sequence objects are not mutable " @@ -1331,21 +1333,21 @@ BioSequence >> newPrototypeWith: aString [ alphabet: self alphabet ] -{ #category : #testing } +{ #category : 'testing' } BioSequence >> notEmpty [ " Answer if the receiver's sequence string contains elements " ^ seq notEmpty ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> occurrencesOf: aCharacter [ " Answer how many of the receiver's elements are equal to aLetter " ^ seq asUppercase occurrencesOf: aCharacter asAminoacidLetter asUppercase ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> occurrencesOfLetters [ " Answer a of occurrence mappings for the receiver " @@ -1359,7 +1361,7 @@ BioSequence >> occurrencesOfLetters [ ^ occurrences ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> positionsOf: aCharacterOrString [ " Answer a Collection with the positions of aminoacidLetter in the receiver's sequence " @@ -1373,7 +1375,7 @@ BioSequence >> positionsOf: aCharacterOrString [ ^ positions ] -{ #category : #printing } +{ #category : 'printing' } BioSequence >> printOn: aStream [ " Private - See superimplementor's comment " @@ -1387,14 +1389,14 @@ BioSequence >> printOn: aStream [ nextPutAll: seq asString between: $[ and: $] ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> randomLength: size [ " See comment in randomLength:for: " ^ self randomLength: size for: self alphabet class ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> randomLength: size for: anAlphabetClass [ " This method modifies the receiver. Set the receiver configured with random residues accordingly anAlphabetClass " @@ -1409,28 +1411,28 @@ BioSequence >> randomLength: size for: anAlphabetClass [ nextPutAll: b asString ] ]. ] -{ #category : #'accessing - sequence record' } +{ #category : 'accessing - sequence record' } BioSequence >> removeSeqFeature: aBioSequenceFeature [ " Remove aBioSequenceFeature from the receiver " self sequenceFeatures remove: aBioSequenceFeature ] -{ #category : #'accesing public - protein synthesis' } +{ #category : 'accesing public - protein synthesis' } BioSequence >> reverseComplement [ " Answer a copy of the receiver's sequence complemented and with element order reversed " ^ self complement reversed ] -{ #category : #'accesing public - protein synthesis' } +{ #category : 'accesing public - protein synthesis' } BioSequence >> reversed [ " Answer a copy of the receiver with element order reversed " ^ self newPrototypeWith: seq reversed ] -{ #category : #'accessing - checksum' } +{ #category : 'accessing - checksum' } BioSequence >> seguid [ "Answer a with the SEquence Globally Unique IDentifier checksum (edundancy check) for the receiver's sequence" @@ -1450,27 +1452,27 @@ BioSequence >> seguid [ ^ id copyFrom: 1 to: id size - 1. ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> sequence [ " Answer a representing the receiver's sequence " ^ seq ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> sequence: aString [ " Set the receiver's sequence to be aString " seq := aString ] -{ #category : #'accessing - sequence record' } +{ #category : 'accessing - sequence record' } BioSequence >> sequenceFeatures [ " Answer a of , the receiver's sequence features " ^ self sequenceRecord sequenceFeatures ] -{ #category : #'accessing - sequence record' } +{ #category : 'accessing - sequence record' } BioSequence >> sequenceRecord [ " Answer the receiver's " @@ -1478,19 +1480,19 @@ BioSequence >> sequenceRecord [ ifNil: [ sequenceRecord := BioSeqRecord new: self ] ] -{ #category : #'accessing - sequence record' } +{ #category : 'accessing - sequence record' } BioSequence >> sequenceRecord: anObject [ sequenceRecord := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> size [ " Answer how many symbols the receiver contains " ^ seq size ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> sizeExcludeTerminals [ "Answer how many symbols (bases or amino acids) contains the receiver, excluding stop/terminal letters (like $*) " @@ -1503,14 +1505,14 @@ BioSequence >> sizeExcludeTerminals [ ^ count ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> splitByCodons [ "Answer a with the receiver splitted at stop codons" ^ self sequence findTokens: $* ] -{ #category : #'accessing private' } +{ #category : 'accessing private' } BioSequence >> stopSymbol [ " Answer a terminator " @@ -1518,7 +1520,7 @@ BioSequence >> stopSymbol [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> subSeqFrom: startInteger to: endInteger [ " Answer the in the receiver's sequence from startInteger to endInteger. startInteger cannot be larger than endInteger, otherwise raise an Exception " @@ -1528,13 +1530,13 @@ BioSequence >> subSeqFrom: startInteger to: endInteger [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> tmStaluc [ self shouldBeImplemented ] -{ #category : #'accesing public - protein synthesis' } +{ #category : 'accesing public - protein synthesis' } BioSequence >> transcribe [ " Answer a new instance of the receiver's with the receiver's sequence transcribed to its corresponding mRNA, adjusting the alphabet " @@ -1549,14 +1551,14 @@ BioSequence >> transcribe [ ] -{ #category : #'accessing private - protein synthesis' } +{ #category : 'accessing private - protein synthesis' } BioSequence >> transcription [ " Answer a with the transcription of the receiver's sequence " ^ seq asUppercase copyReplaceAll: 'T' with: 'U' ] -{ #category : #'accesing public - protein synthesis' } +{ #category : 'accesing public - protein synthesis' } BioSequence >> translate [ "Answer a new instance of the receiver's with the receiver's sequence translated to its corresponding Protein, adjusting the alphabet. Use the defaults. See comment in #translateTable:stopSymbol:toStop:cds:" @@ -1570,7 +1572,7 @@ BioSequence >> translate [ ] -{ #category : #'accesing public - protein synthesis' } +{ #category : 'accesing public - protein synthesis' } BioSequence >> translateToStop [ " Answer a new instance of the receiver's with the receiver's sequence translated to its corresponding Protein, adjusting the alphabet. Use the defaults. See comment in #translateTable:stopSymbol:toStop:cds: " @@ -1584,7 +1586,7 @@ BioSequence >> translateToStop [ ] -{ #category : #'accesing public - protein synthesis' } +{ #category : 'accesing public - protein synthesis' } BioSequence >> translateWithTableId: tableIdentifier [ " Answer a new instance of the receiver's with the receiver's sequence translated to its corresponding Protein, adjusting the alphabet. Use the defaults. See comment in #translateTable:stopSymbol:toStop:cds: " @@ -1598,7 +1600,7 @@ BioSequence >> translateWithTableId: tableIdentifier [ ] -{ #category : #'accesing public - protein synthesis' } +{ #category : 'accesing public - protein synthesis' } BioSequence >> translateWithTableId: tableIdentifier stopSymbol: stopCharacter [ " Answer a new instance of the receiver's with the receiver's sequence translated to its corresponding Protein, adjusting the alphabet. Use the defaults. See comment in #translateTable:stopSymbol:toStop:cds: " @@ -1612,7 +1614,7 @@ BioSequence >> translateWithTableId: tableIdentifier stopSymbol: stopCharacter [ ] -{ #category : #'accesing public - protein synthesis' } +{ #category : 'accesing public - protein synthesis' } BioSequence >> translateWithTableId: aTableIdentifier stopSymbol: stopCharacter toStop: stopBoolean cds: cdsBoolean [ " Answer a new instance of the receiver's with the receiver's sequence translated to its corresponding Protein, adjusting the alphabet. @@ -1646,7 +1648,7 @@ BioSequence >> translateWithTableId: aTableIdentifier stopSymbol: stopCharacter ] -{ #category : #'accessing private - protein synthesis' } +{ #category : 'accessing private - protein synthesis' } BioSequence >> translationTable: aTableIdentifier stopSymbol: stopCharacter toStop: stopBoolean cds: cdsBoolean [ @@ -1670,14 +1672,14 @@ BioSequence >> translationTable: aTableIdentifier stopSymbol: stopCharacter toSt ] -{ #category : #'accessing public - utils' } +{ #category : 'accessing public - utils' } BioSequence >> trim: aCharacter [ " Modify the receiver by removing aCharacter in its sequence " seq := seq copyWithout: aCharacter. ] -{ #category : #'accessing public - utils' } +{ #category : 'accessing public - utils' } BioSequence >> trimAmbiguityCodes [ " This method modifies the receiver. Trim off all ambiguity codes " @@ -1686,7 +1688,7 @@ BioSequence >> trimAmbiguityCodes [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> truncateFrom: startInteger [ " Modify the receiver slicing the sequence from startInteger position up to the last position. The startInteger is inclusive " @@ -1698,7 +1700,7 @@ BioSequence >> truncateFrom: startInteger [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> truncateFrom: startInteger to: endInteger [ " Modify the receiver slicing the sequence from startInteger position up to endInteger position. The startInteger and endInteger are inclusive, i.e. #copyFrom: 1 to: 2 answer the first two bases of the sequence. " @@ -1710,7 +1712,7 @@ BioSequence >> truncateFrom: startInteger to: endInteger [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequence >> truncateTo: endInteger [ " Modify the receiver slicing the sequence from the beggining up to endInteger position. The endInteger is inclusive, " diff --git a/repository/BioTools/BioSequenceFeature.class.st b/repository/BioTools/BioSequenceFeature.class.st index a538bdc7..1fa3bccd 100644 --- a/repository/BioTools/BioSequenceFeature.class.st +++ b/repository/BioTools/BioSequenceFeature.class.st @@ -18,8 +18,8 @@ Internal Representation and Key Implementation Points. Implementation Points " Class { - #name : #BioSequenceFeature, - #superclass : #BioChromosomeFragment, + #name : 'BioSequenceFeature', + #superclass : 'BioChromosomeFragment', #instVars : [ 'sequence', 'strand', @@ -31,10 +31,12 @@ Class { 'tags', 'chromosome' ], - #category : #'BioTools-Sequences' + #category : 'BioTools-Sequences', + #package : 'BioTools', + #tag : 'Sequences' } -{ #category : #examples } +{ #category : 'examples' } BioSequenceFeature class >> example01 [ " Based in BioPerl example : http://lab.stajich.org/presentations/stajich_2006_Bioperl_I.pdf " @@ -50,7 +52,7 @@ BioSequenceFeature class >> example01 [ yourself ] -{ #category : #examples } +{ #category : 'examples' } BioSequenceFeature class >> fromCoordinateStart: startCoordinate end: endCoordinate [ ^ self new @@ -59,7 +61,7 @@ BioSequenceFeature class >> fromCoordinateStart: startCoordinate end: endCoordin yourself ] -{ #category : #comparing } +{ #category : 'comparing' } BioSequenceFeature >> = aBioSequenceFeature [ "Answer if the receiver is equal to aBioSequenceFeature" @@ -71,43 +73,43 @@ BioSequenceFeature >> = aBioSequenceFeature [ ] -{ #category : #'accessing - tags' } +{ #category : 'accessing - tags' } BioSequenceFeature >> addTag: anAssociation [ " Add a tag value pair in anAssociation to the receiver's tags " self tags at: anAssociation key put: anAssociation value ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequenceFeature >> chromosome [ ^ chromosome ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequenceFeature >> chromosome: anObject [ chromosome := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequenceFeature >> frame [ ^ frame ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequenceFeature >> frame: anObject [ frame := anObject ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceFeature >> hasTagNamed: aString [ " Answer if aString exists as a tag in the receiver " ] -{ #category : #comparing } +{ #category : 'comparing' } BioSequenceFeature >> hash [ " Private - hash is implemented because #= is implemented " @@ -115,24 +117,24 @@ BioSequenceFeature >> hash [ ] -{ #category : #'accessing - tags' } +{ #category : 'accessing - tags' } BioSequenceFeature >> includesTag: tagName [ " Answer if tag with tagName String is present in the receiver's tags " ^ self tags includesKey: tagName ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequenceFeature >> location [ ^ location ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequenceFeature >> location: anObject [ location := anObject ] -{ #category : #testing } +{ #category : 'testing' } BioSequenceFeature >> overlaps: aBioSequenceFeature [ "Answer if the receiver start and end regions overlaps aBioSequenceFeature regions" @@ -167,75 +169,75 @@ BioSequenceFeature >> overlaps: aBioSequenceFeature [ ^ false ] -{ #category : #'accessing - tags' } +{ #category : 'accessing - tags' } BioSequenceFeature >> primaryTag [ ^ primaryTag ] -{ #category : #'accessing - tags' } +{ #category : 'accessing - tags' } BioSequenceFeature >> primaryTag: anObject [ primaryTag := anObject ] -{ #category : #'accessing - tags' } +{ #category : 'accessing - tags' } BioSequenceFeature >> removeTag: tagName [ " Remove tagName from the receiver's tags " self tags removeKey: tagName ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequenceFeature >> score [ " Answer a representing the receiver's score " ^ score ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequenceFeature >> score: aNumber [ " Set the receiver's score to aNumber " score := aNumber ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequenceFeature >> sequence [ ^ sequence ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequenceFeature >> sequence: anObject [ sequence := anObject ] -{ #category : #'accessing - tags' } +{ #category : 'accessing - tags' } BioSequenceFeature >> sourceTag [ ^ sourceTag ] -{ #category : #'accessing - tags' } +{ #category : 'accessing - tags' } BioSequenceFeature >> sourceTag: anObject [ sourceTag := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequenceFeature >> strand [ ^ strand ] -{ #category : #accessing } +{ #category : 'accessing' } BioSequenceFeature >> strand: anObject [ strand := anObject ] -{ #category : #'accessing - tags' } +{ #category : 'accessing - tags' } BioSequenceFeature >> tagCollectionClass [ " Answer a for storing the receiver's tags " ^ Dictionary ] -{ #category : #'accessing - tags' } +{ #category : 'accessing - tags' } BioSequenceFeature >> tags [ " Answer a with the receiver's tags " @@ -243,7 +245,7 @@ BioSequenceFeature >> tags [ ifNil: [ tags := self tagCollectionClass new ] ] -{ #category : #'accessing - tags' } +{ #category : 'accessing - tags' } BioSequenceFeature >> tags: anObject [ tags := anObject ] diff --git a/repository/BioTools/BioSerializationEngine.class.st b/repository/BioTools/BioSerializationEngine.class.st index fab6c9df..d8b3e496 100644 --- a/repository/BioTools/BioSerializationEngine.class.st +++ b/repository/BioTools/BioSerializationEngine.class.st @@ -2,16 +2,18 @@ BioSerializationEngine is the superclass for all known serializers. Behavior of serializers includes materialization and compression (compression is not implemented currently). " Class { - #name : #BioSerializationEngine, - #superclass : #BioAbstractAdapter, + #name : 'BioSerializationEngine', + #superclass : 'BioAbstractAdapter', #instVars : [ 'doCompression', 'location' ], - #category : #'BioTools-Adapters' + #category : 'BioTools-Adapters', + #package : 'BioTools', + #tag : 'Adapters' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioSerializationEngine class >> for: locationString [ ^ self adapterClass new @@ -21,7 +23,7 @@ BioSerializationEngine class >> for: locationString [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioSerializationEngine class >> materialize: aLocationString [ | materialization | @@ -33,7 +35,7 @@ BioSerializationEngine class >> materialize: aLocationString [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioSerializationEngine class >> serialize: anObject [ " Check and correct, if necessary, anObject's name before serializing into a file " @@ -49,37 +51,37 @@ BioSerializationEngine class >> serialize: anObject [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioSerializationEngine >> doCompression [ ^ doCompression ifNil: [ doCompression := false ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioSerializationEngine >> doCompression: anObject [ doCompression := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioSerializationEngine >> doCompressionIn: aFilename [ ] -{ #category : #testing } +{ #category : 'testing' } BioSerializationEngine >> isValidMaterialization [ " Answer if the receiver's location is valid for materialization " ^ self location asFileReference isFuel ] -{ #category : #accessing } +{ #category : 'accessing' } BioSerializationEngine >> location [ ^ location ] -{ #category : #accessing } +{ #category : 'accessing' } BioSerializationEngine >> location: anObject [ location := anObject ] diff --git a/repository/BioTools/BioSmartRefStreamSerializer.class.st b/repository/BioTools/BioSmartRefStreamSerializer.class.st index d07bc93e..17304376 100644 --- a/repository/BioTools/BioSmartRefStreamSerializer.class.st +++ b/repository/BioTools/BioSmartRefStreamSerializer.class.st @@ -10,19 +10,21 @@ to get the contents at an URL: (BioWebClientEngine for: 'http://www.google.com.ar') httpGet " Class { - #name : #BioSmartRefStreamSerializer, - #superclass : #BioSerializationEngine, - #category : #'BioTools-Adapters' + #name : 'BioSmartRefStreamSerializer', + #superclass : 'BioSerializationEngine', + #category : 'BioTools-Adapters', + #package : 'BioTools', + #tag : 'Adapters' } -{ #category : #accessing } +{ #category : 'accessing' } BioSmartRefStreamSerializer class >> providerClass [ " See superimplementor's comment " ^ #FileStream ] -{ #category : #accessing } +{ #category : 'accessing' } BioSmartRefStreamSerializer >> materialize [ " See superimplementor comment " @@ -35,7 +37,7 @@ BioSmartRefStreamSerializer >> materialize [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioSmartRefStreamSerializer >> serialize: anObject [ " See superimplementor's comment " diff --git a/repository/BioTools/BioStrand.class.st b/repository/BioTools/BioStrand.class.st new file mode 100644 index 00000000..dfb69bfc --- /dev/null +++ b/repository/BioTools/BioStrand.class.st @@ -0,0 +1,88 @@ +Class { + #name : 'BioStrand', + #superclass : 'BioObject', + #instVars : [ + 'symbol' + ], + #classInstVars : [ + 'Plus', + 'Minus', + 'Unknown' + ], + #category : 'BioTools-Genomic-Ranges', + #package : 'BioTools', + #tag : 'Genomic-Ranges' +} + +{ #category : 'class initialization' } +BioStrand class >> from: anObject [ + | s | + s := anObject asString. + s = '+' ifTrue: [ ^ self plus ]. + s = '-' ifTrue: [ ^ self minus ]. + s = '*' ifTrue: [ ^ self unknown ]. + self error: 'Invalid strand: ', s +] + +{ #category : 'class initialization' } +BioStrand class >> initialize [ + "Initialize singleton strand values." + Plus := self new symbol: #+; yourself. + Minus := self new symbol: #-; yourself. + Unknown := self new symbol: #* +] + +{ #category : 'class initialization' } +BioStrand class >> minus [ + Minus ifNil: [ self initialize ]. + ^ Minus +] + +{ #category : 'class initialization' } +BioStrand class >> plus [ + Plus ifNil: [ self initialize ]. + ^ Plus +] + +{ #category : 'class initialization' } +BioStrand class >> unknown [ + Unknown ifNil: [ self initialize ]. + ^ Unknown +] + +{ #category : 'accessing' } +BioStrand >> flip [ + symbol = #+ ifTrue: [ ^ BioStrand minus ]. + symbol = #- ifTrue: [ ^ BioStrand plus ]. + ^ self class unknown +] + +{ #category : 'testing' } +BioStrand >> isMinus [ + ^ symbol = #- +] + +{ #category : 'testing' } +BioStrand >> isPlus [ + ^ symbol = #+ +] + +{ #category : 'testing' } +BioStrand >> isUnknown [ + ^ symbol = #* +] + +{ #category : 'printing' } +BioStrand >> printOn: aStream [ + aStream nextPutAll: symbol asString +] + +{ #category : 'accessing' } +BioStrand >> symbol [ + ^ symbol +] + +{ #category : 'accessing' } +BioStrand >> symbol: aSymbol [ + symbol := aSymbol +] diff --git a/repository/BioTools/BioTranscript.class.st b/repository/BioTools/BioTranscript.class.st index dd054078..d71aaf04 100644 --- a/repository/BioTools/BioTranscript.class.st +++ b/repository/BioTools/BioTranscript.class.st @@ -2,21 +2,23 @@ A BioTranscript is a set of `BioExon`. " Class { - #name : #BioTranscript, - #superclass : #BioSequenceFeature, + #name : 'BioTranscript', + #superclass : 'BioSequenceFeature', #instVars : [ 'exons' ], - #category : #'BioTools-Sequences' + #category : 'BioTools-Sequences', + #package : 'BioTools', + #tag : 'Sequences' } -{ #category : #accessing } +{ #category : 'accessing' } BioTranscript >> exons [ ^ exons ] -{ #category : #accessing } +{ #category : 'accessing' } BioTranscript >> exons: anObject [ exons := anObject diff --git a/repository/BioTools/BioUIManagerEngine.class.st b/repository/BioTools/BioUIManagerEngine.class.st index d5de291c..51b1806f 100644 --- a/repository/BioTools/BioUIManagerEngine.class.st +++ b/repository/BioTools/BioUIManagerEngine.class.st @@ -2,19 +2,21 @@ UIManager is a dispatcher used in Pharo for UI interactivity with users. " Class { - #name : #BioUIManagerEngine, - #superclass : #BioInteractorEngine, - #category : 'BioTools-Adapters' + #name : 'BioUIManagerEngine', + #superclass : 'BioInteractorEngine', + #category : 'BioTools-Adapters', + #package : 'BioTools', + #tag : 'Adapters' } -{ #category : #accessing } +{ #category : 'accessing' } BioUIManagerEngine class >> providerClass [ " See superimplementor's comment " ^ #UIManager ] -{ #category : #accessing } +{ #category : 'accessing' } BioUIManagerEngine class >> request: aString [ " Request and answer the string the user accepts. Answer an empty string if the user cancels." @@ -24,7 +26,7 @@ BioUIManagerEngine class >> request: aString [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioUIManagerEngine >> request: aString [ " Refer to comment in #request: " diff --git a/repository/BioTools/BioUnknownSeq.class.st b/repository/BioTools/BioUnknownSeq.class.st index e89d4cf0..bade4eb6 100644 --- a/repository/BioTools/BioUnknownSeq.class.st +++ b/repository/BioTools/BioUnknownSeq.class.st @@ -6,22 +6,24 @@ Instance Variables: " Class { - #name : #BioUnknownSeq, - #superclass : #BioMutableSeq, + #name : 'BioUnknownSeq', + #superclass : 'BioMutableSeq', #instVars : [ 'size' ], - #category : #'BioTools-Sequences' + #category : 'BioTools-Sequences', + #package : 'BioTools', + #tag : 'Sequences' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioUnknownSeq class >> new: sizeRequested [ " Answer a new instance of the receiver of sizeRequested length " ^ self new size: sizeRequested ] -{ #category : #converting } +{ #category : 'converting' } BioUnknownSeq >> asString [ " Answer a with the receiver's sequence " @@ -30,7 +32,7 @@ BioUnknownSeq >> asString [ repeat: self size ] -{ #category : #accessing } +{ #category : 'accessing' } BioUnknownSeq >> complementary [ " Answer a with the complement of the receiver's sequence " @@ -38,7 +40,7 @@ BioUnknownSeq >> complementary [ ] -{ #category : #'initialize-release' } +{ #category : 'initialize-release' } BioUnknownSeq >> initializeWith: aString [ " Private - Initialize the receiver's sequence to be aString " @@ -46,7 +48,7 @@ BioUnknownSeq >> initializeWith: aString [ alphabet := self defaultAlphabetClass new. ] -{ #category : #printing } +{ #category : 'printing' } BioUnknownSeq >> printOn: aStream [ " Private - See superimplementor's comment " @@ -61,14 +63,14 @@ BioUnknownSeq >> printOn: aStream [ nextPutAll: self asString between: $[ and: $] ] -{ #category : #'accesing public - protein synthesis' } +{ #category : 'accesing public - protein synthesis' } BioUnknownSeq >> reversed [ " Answer a copy of the receiver with element order reversed " ^ self sameSequence ] -{ #category : #'accessing private' } +{ #category : 'accessing private' } BioUnknownSeq >> sameSequence [ " Answer a with the same letter used in all receiver's positions " @@ -76,28 +78,28 @@ BioUnknownSeq >> sameSequence [ size timesRepeat: [ stream nextPut: self unknownLetter ] ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioUnknownSeq >> size [ " Answer how many elements the receiver contains " ^ size ] -{ #category : #accessing } +{ #category : 'accessing' } BioUnknownSeq >> size: anInteger [ " Set how many elements the receiver contains " size := anInteger ] -{ #category : #'accessing private' } +{ #category : 'accessing private' } BioUnknownSeq >> unknownLetter [ " Answer a with the default letter used when a letter in a position in the sequence is unknown " ^ self alphabet unknownLetter ] -{ #category : #'accessing private' } +{ #category : 'accessing private' } BioUnknownSeq >> unknownLetter: aCharacter [ " Set aCharacter as the default letter used when a letter in a position in the sequence is unknown " diff --git a/repository/BioTools/BioUrl.class.st b/repository/BioTools/BioUrl.class.st index 6018555e..219e3243 100644 --- a/repository/BioTools/BioUrl.class.st +++ b/repository/BioTools/BioUrl.class.st @@ -7,22 +7,24 @@ A URL that can be accessed via the Hypertext Transfer Protocol (HTTP), ie, a sta " Class { - #name : #BioUrl, - #superclass : #ZnUrl, + #name : 'BioUrl', + #superclass : 'ZnUrl', #instVars : [ 'webClient' ], - #category : #'BioTools-Core' + #category : 'BioTools-Core', + #package : 'BioTools', + #tag : 'Core' } -{ #category : #accessing } +{ #category : 'accessing' } BioUrl >> activate [ " See superimplementor's comment " ^ (self webClient httpGet: self downloadUrl) contents asString ] -{ #category : #deprecate } +{ #category : 'deprecate' } BioUrl >> addParameters: aQueryString [ " Append aQueryString as the receiver's database name " @@ -35,7 +37,7 @@ BioUrl >> addParameters: aQueryString [ ifFalse: [ self error ] ] -{ #category : #deprecate } +{ #category : 'deprecate' } BioUrl >> buildUrl: pathPrefix with: aPath [ " Append aString as the receiver's command name " @@ -46,7 +48,7 @@ BioUrl >> buildUrl: pathPrefix with: aPath [ self path addLast: urlString ] -{ #category : #deprecate } +{ #category : 'deprecate' } BioUrl >> cmdName: aCmdString [ " Append aString as the receiver's command name " @@ -55,28 +57,28 @@ BioUrl >> cmdName: aCmdString [ ] -{ #category : #deprecate } +{ #category : 'deprecate' } BioUrl >> dbName: aString [ " Append aString as the receiver's database name " self addPathSegment: aString ] -{ #category : #private } +{ #category : 'private' } BioUrl >> defaultWebClient [ " Answer the current web client configured for the receiver " ^ BioWebClientEngine for: self ] -{ #category : #converting } +{ #category : 'converting' } BioUrl >> downloadUrl [ " Answer a String decoding the fields embedded in the url ?var1=val1&var2=val2 " ^ self webClient downloadUrl ] -{ #category : #deprecate } +{ #category : 'deprecate' } BioUrl >> includesParameter: aString [ " Answer if the receiver already includes a parameter named aString " @@ -85,14 +87,14 @@ BioUrl >> includesParameter: aString [ do: [ : ex | ex return: false ] ] -{ #category : #deprecate } +{ #category : 'deprecate' } BioUrl >> urlTokens [ " Answer a Collection of commonly used tokens in URLs " ^ #($? $= $&) ] -{ #category : #deprecate } +{ #category : 'deprecate' } BioUrl >> valueForParameter: aString [ " Answer a Collection with the receiver's parameter names " @@ -107,14 +109,14 @@ BioUrl >> valueForParameter: aString [ ^ self queryAt: aString ] -{ #category : #accessing } +{ #category : 'accessing' } BioUrl >> webClient [ ^ webClient ifNil: [ webClient := self defaultWebClient ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioUrl >> webClient: anObject [ webClient := anObject ] diff --git a/repository/BioTools/BioVersionedObject.class.st b/repository/BioTools/BioVersionedObject.class.st index a81bb947..7ed1ae47 100644 --- a/repository/BioTools/BioVersionedObject.class.st +++ b/repository/BioTools/BioVersionedObject.class.st @@ -9,48 +9,50 @@ Instance Variables " Class { - #name : #BioVersionedObject, - #superclass : #BioObject, + #name : 'BioVersionedObject', + #superclass : 'BioObject', #instVars : [ 'versions', 'date', 'author' ], - #category : #'BioTools-Core' + #category : 'BioTools-Core', + #package : 'BioTools', + #tag : 'Core' } -{ #category : #accessing } +{ #category : 'accessing' } BioVersionedObject >> author [ " Answer an object responsible of the receiver's creation or maintenance " ^ author ] -{ #category : #accessing } +{ #category : 'accessing' } BioVersionedObject >> author: anObject [ " Set the receiver's responsible for creation/maintenance " author := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioVersionedObject >> date [ ^ date ] -{ #category : #accessing } +{ #category : 'accessing' } BioVersionedObject >> date: anObject [ date := anObject ] -{ #category : #testing } +{ #category : 'testing' } BioVersionedObject >> hasVersions [ " Answer if the receiver was versioned " ^ self versions isNotEmpty ] -{ #category : #initialization } +{ #category : 'initialization' } BioVersionedObject >> initialize [ " Private - Initialize receiver's versioning information " @@ -59,12 +61,12 @@ BioVersionedObject >> initialize [ date := self dateClass now. ] -{ #category : #accessing } +{ #category : 'accessing' } BioVersionedObject >> versions [ ^ versions ] -{ #category : #accessing } +{ #category : 'accessing' } BioVersionedObject >> versions: anObject [ versions := anObject ] diff --git a/repository/BioTools/BioWebClient.class.st b/repository/BioTools/BioWebClient.class.st index 34c743c6..07e071c8 100644 --- a/repository/BioTools/BioWebClient.class.st +++ b/repository/BioTools/BioWebClient.class.st @@ -11,19 +11,21 @@ to get the contents at an URL: " Class { - #name : #BioWebClient, - #superclass : #BioWebClientEngine, - #category : #'BioTools-Adapters' + #name : 'BioWebClient', + #superclass : 'BioWebClientEngine', + #category : 'BioTools-Adapters', + #package : 'BioTools', + #tag : 'Adapters' } -{ #category : #accessing } +{ #category : 'accessing' } BioWebClient class >> decode: aString [ " See superimplementor's comment " ^ (self urlClass decodeUrlEncodedForm: aString) keys anyOne ] -{ #category : #testing } +{ #category : 'testing' } BioWebClient class >> isPreferredAdapter [ " Private - See superimplementor's comment " @@ -31,7 +33,7 @@ BioWebClient class >> isPreferredAdapter [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioWebClient class >> providerClass [ " See superimplementor's comment " @@ -39,21 +41,21 @@ BioWebClient class >> providerClass [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioWebClient class >> urlClass [ " Answer a implementing an interpreted URL/URI " ^ self classFor: #WebUtils ] -{ #category : #accessing } +{ #category : 'accessing' } BioWebClient >> downloadUrl [ " See superimplementor's comment " ^ (self urlClass decodeUrlEncodedForm: self url asString) keys anyOne ] -{ #category : #private } +{ #category : 'private' } BioWebClient >> responseType [ ^ self classFor: #WebResponse diff --git a/repository/BioTools/BioWebClientEngine.class.st b/repository/BioTools/BioWebClientEngine.class.st index 84c1d6af..4b77afb4 100644 --- a/repository/BioTools/BioWebClientEngine.class.st +++ b/repository/BioTools/BioWebClientEngine.class.st @@ -2,32 +2,34 @@ BioWebClientEngine is the superclass for HTTP clients, which lets to make request and get both the response content and the response headers " Class { - #name : #BioWebClientEngine, - #superclass : #BioAbstractAdapter, + #name : 'BioWebClientEngine', + #superclass : 'BioAbstractAdapter', #instVars : [ 'url' ], #classVars : [ 'AdapterClass' ], - #category : 'BioTools-Adapters' + #category : 'BioTools-Adapters', + #package : 'BioTools', + #tag : 'Adapters' } -{ #category : #accessing } +{ #category : 'accessing' } BioWebClientEngine class >> adapterClass: aClass [ " Set the receiver's subclass acting as adapter to be aClass " ^ AdapterClass := aClass ] -{ #category : #accessing } +{ #category : 'accessing' } BioWebClientEngine class >> decode: aString [ " Answer a String. Decodes the fields embedded in aString url ?var1=val1&var2=val2 " ^ self adapterClass new decode: aString ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } BioWebClientEngine class >> for: anUrl [ ^ self adapterClass new @@ -37,35 +39,35 @@ BioWebClientEngine class >> for: anUrl [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioWebClientEngine class >> urlFromString: aString [ " Answer an URL object with aString as resource locator " ^ self adapterClass new urlFromString: aString ] -{ #category : #accessing } +{ #category : 'accessing' } BioWebClientEngine >> decode: aString [ " Answer a String. Decodes the fields embedded in aString url ?var1=val1&var2=val2 " ^ self provider decode: aString ] -{ #category : #accessing } +{ #category : 'accessing' } BioWebClientEngine >> downloadUrl [ " Answer a String decodeding the fields embedded in the url ?var1=val1&var2=val2 " ^ self subclassResponsibility ] -{ #category : #accessing } +{ #category : 'accessing' } BioWebClientEngine >> httpGet [ " Answer the response from the receiver's current url " ^ (self classFor: self providerClass) httpGet: self downloadUrl ] -{ #category : #accessing } +{ #category : 'accessing' } BioWebClientEngine >> httpGet: urlString [ "Get the response from the given url" " ( self httpGet: 'http://www.squeak.org') content " @@ -73,7 +75,7 @@ BioWebClientEngine >> httpGet: urlString [ ^ (self classFor: self providerClass) httpGet: urlString ] -{ #category : #accessing } +{ #category : 'accessing' } BioWebClientEngine >> httpGetContents [ " Answer the String contents in the response from the receiver's current url " @@ -82,24 +84,24 @@ BioWebClientEngine >> httpGetContents [ do: [ : ex | self httpGet content ] ] -{ #category : #accessing } +{ #category : 'accessing' } BioWebClientEngine >> url [ ^ url ] -{ #category : #accessing } +{ #category : 'accessing' } BioWebClientEngine >> url: anObject [ url := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } BioWebClientEngine >> urlClass [ " Answer a implementing an interpreted URL/URI " ^ self class urlClass ] -{ #category : #accessing } +{ #category : 'accessing' } BioWebClientEngine >> urlFromString: aString [ ^ self urlClass fromString: aString. diff --git a/repository/BioTools/BioWebCollection.class.st b/repository/BioTools/BioWebCollection.class.st index ca2261b4..0d30c216 100644 --- a/repository/BioTools/BioWebCollection.class.st +++ b/repository/BioTools/BioWebCollection.class.st @@ -1,10 +1,12 @@ Class { - #name : #BioWebCollection, - #superclass : #BioOrderedCollection, - #category : 'BioTools-Collections' + #name : 'BioWebCollection', + #superclass : 'BioOrderedCollection', + #category : 'BioTools-Collections', + #package : 'BioTools', + #tag : 'Collections' } -{ #category : #accessing } +{ #category : 'accessing' } BioWebCollection >> addParametersTo: aBioClient [ " Format and add the receiver's elements to aBioClient " diff --git a/repository/BioTools/BioWebResult.class.st b/repository/BioTools/BioWebResult.class.st index e78dedbb..c2e8d059 100644 --- a/repository/BioTools/BioWebResult.class.st +++ b/repository/BioTools/BioWebResult.class.st @@ -3,12 +3,14 @@ A BioWebResult represents the output from a web query. " Class { - #name : #BioWebResult, - #superclass : #BioInitialResult, - #category : #'BioTools-Query' + #name : 'BioWebResult', + #superclass : 'BioInitialResult', + #category : 'BioTools-Query', + #package : 'BioTools', + #tag : 'Query' } -{ #category : #accessing } +{ #category : 'accessing' } BioWebResult >> executeFor: aClient [ " Private - Perform the actual search. Answer the receiver " diff --git a/repository/BioTools/BioWebServerEngine.class.st b/repository/BioTools/BioWebServerEngine.class.st index d5a894cf..87b31b86 100644 --- a/repository/BioTools/BioWebServerEngine.class.st +++ b/repository/BioTools/BioWebServerEngine.class.st @@ -3,26 +3,28 @@ BioWebServerEngine is the superclass for HTTP servers. " Class { - #name : #BioWebServerEngine, - #superclass : #BioAbstractAdapter, - #category : #'BioTools-Adapters' + #name : 'BioWebServerEngine', + #superclass : 'BioAbstractAdapter', + #category : 'BioTools-Adapters', + #package : 'BioTools', + #tag : 'Adapters' } -{ #category : #accessing } +{ #category : 'accessing' } BioWebServerEngine class >> documentRootDirectory [ " Answer a specifying the directory where web server document root will be located " ^ self fileDirectoryClass default fullName , self testFilesDirectoryName ] -{ #category : #accessing } +{ #category : 'accessing' } BioWebServerEngine class >> isRunning [ " Answer if the receiver is in execution state " self subclassResponsibility ] -{ #category : #testing } +{ #category : 'testing' } BioWebServerEngine class >> isRunningTestWebServer [ " Answer if system is running a web server " @@ -41,21 +43,21 @@ BioWebServerEngine class >> isRunningTestWebServer [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioWebServerEngine class >> isStopped [ " Answer if the receiver is in stopped state " self subclassResponsibility ] -{ #category : #testing } +{ #category : 'testing' } BioWebServerEngine class >> localPorts [ " Answer a of representing known ports where a web server could be running " ^ #(80 81 443 2082 7777 8080 8081 8888 9090 51969) ] -{ #category : #accessing } +{ #category : 'accessing' } BioWebServerEngine class >> port [ " Answer a with the default web server port " @@ -63,21 +65,21 @@ BioWebServerEngine class >> port [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioWebServerEngine class >> serverRootDirectory [ " Answer a specifying the directory where web server files are located " ^ self fileDirectoryClass default fullName , self testFilesDirectoryName ] -{ #category : #accessing } +{ #category : 'accessing' } BioWebServerEngine class >> startWebServer [ " Start a web server " self adapterClass startWebServer ] -{ #category : #accessing } +{ #category : 'accessing' } BioWebServerEngine class >> stopWebServer [ " Stop the web server " diff --git a/repository/BioTools/BioZnHTTPServer.class.st b/repository/BioTools/BioZnHTTPServer.class.st index 6166aa08..48ccadec 100644 --- a/repository/BioTools/BioZnHTTPServer.class.st +++ b/repository/BioTools/BioZnHTTPServer.class.st @@ -10,26 +10,28 @@ to get the contents at an URL: (BioWebClientEngine for: 'http://www.google.com.ar') httpGet " Class { - #name : #BioZnHTTPServer, - #superclass : #BioWebServerEngine, - #category : #'BioTools-Adapters' + #name : 'BioZnHTTPServer', + #superclass : 'BioWebServerEngine', + #category : 'BioTools-Adapters', + #package : 'BioTools', + #tag : 'Adapters' } -{ #category : #testing } +{ #category : 'testing' } BioZnHTTPServer class >> isPreferredAdapter [ " Private - See superimplementor's comment " ^ true ] -{ #category : #accessing } +{ #category : 'accessing' } BioZnHTTPServer class >> providerClass [ " See superimplementor's comment " ^ #ZnManagingMultiThreadedServer ] -{ #category : #accessing } +{ #category : 'accessing' } BioZnHTTPServer class >> startWebServer [ " See superimplementor's comment " @@ -41,7 +43,7 @@ BioZnHTTPServer class >> startWebServer [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioZnHTTPServer class >> stopWebServer [ " See superimplementor's comment " diff --git a/repository/BioTools/BioZnHttpClient.class.st b/repository/BioTools/BioZnHttpClient.class.st index a3c8e08a..7cb6e67e 100644 --- a/repository/BioTools/BioZnHttpClient.class.st +++ b/repository/BioTools/BioZnHttpClient.class.st @@ -13,12 +13,14 @@ to get the contents at an URL: " Class { - #name : #BioZnHttpClient, - #superclass : #BioWebClientEngine, - #category : #'BioTools-Adapters' + #name : 'BioZnHttpClient', + #superclass : 'BioWebClientEngine', + #category : 'BioTools-Adapters', + #package : 'BioTools', + #tag : 'Adapters' } -{ #category : #accessing } +{ #category : 'accessing' } BioZnHttpClient class >> decode: aString [ " See superimplementor's comment " @@ -34,28 +36,28 @@ BioZnHttpClient class >> decode: aString [ ] -{ #category : #testing } +{ #category : 'testing' } BioZnHttpClient class >> isPreferredAdapter [ " Private - See superimplementor's comment " ^ self isRunningInPharo ] -{ #category : #accessing } +{ #category : 'accessing' } BioZnHttpClient class >> providerClass [ " See superimplementor's comment " ^ #ZnClient ] -{ #category : #accessing } +{ #category : 'accessing' } BioZnHttpClient class >> urlClass [ " Answer a implementing an interpreted URL/URI " ^ self classFor: #BioUrl ] -{ #category : #accessing } +{ #category : 'accessing' } BioZnHttpClient >> decode: aString [ " See superimplementor's comment " @@ -63,7 +65,7 @@ BioZnHttpClient >> decode: aString [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioZnHttpClient >> downloadUrl [ " See superimplementor's comment " @@ -75,7 +77,7 @@ BioZnHttpClient >> downloadUrl [ ] -{ #category : #private } +{ #category : 'private' } BioZnHttpClient >> handleNonResumableConnection: anException [ | msg | msg := 'We got a non-resumable exception while connecting to ' @@ -88,7 +90,7 @@ BioZnHttpClient >> handleNonResumableConnection: anException [ anException retry ] -{ #category : #accessing } +{ #category : 'accessing' } BioZnHttpClient >> handleProgressBar: bar notification: ex [ | progress | @@ -101,7 +103,7 @@ BioZnHttpClient >> handleProgressBar: bar notification: ex [ progress resume ] -{ #category : #accessing } +{ #category : 'accessing' } BioZnHttpClient >> handleWebClientException: ex progressBar: bar [ (ex isKindOf: (Smalltalk at: #HTTPProgress)) @@ -118,7 +120,7 @@ BioZnHttpClient >> handleWebClientException: ex progressBar: bar [ ] -{ #category : #accessing } +{ #category : 'accessing' } BioZnHttpClient >> httpGet: urlString [ "Get the response from the given url" " (self httpGet: 'http://www.squeak.org') content " diff --git a/repository/BioTools/Character.extension.st b/repository/BioTools/Character.extension.st index a224bf3e..ee3d69fd 100644 --- a/repository/BioTools/Character.extension.st +++ b/repository/BioTools/Character.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #Character } +Extension { #name : 'Character' } -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Character >> asAminoacidLetter [ " Answer the receiver " @@ -8,7 +8,7 @@ Character >> asAminoacidLetter [ ^ self ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Character >> asAminoacidName [ " Answer the complete name of the receiver's aminoacid letter. " @@ -18,7 +18,7 @@ Character >> asAminoacidName [ ifAbsent: [ self signalNotFound: 'Letter code not recognized as aminoacid' ] ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Character >> asDNANucleotide [ " Answer the receiver as a " @@ -26,14 +26,14 @@ Character >> asDNANucleotide [ ^ BioDNANucleotide with: self ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Character >> asDisambiguatedDNA [ " Answer a matching the receiver's disambiguated DNA letter. For example M -> AC " ^ BioSequence disambiguateLetter: self asString ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Character >> asDisambiguatedDNAFormatted [ " Answer a . If the receiver represents an DNA ambiguous letter, then answer will match the receiver's disambiguated DNA letter. For example M -> AC. Otherwise, answer the receiver " @@ -47,14 +47,14 @@ Character >> asDisambiguatedDNAFormatted [ ifFalse: [ stream nextPutAll: self asString ] ] ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Character >> isBiologicalSequence [ " Answer if the receiver represents an identifiable biological letter " ^ self isDNASequence or: [ self isRNASequence or: [ self isProteinSequence ] ] ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Character >> isDNASequence [ " Answer if the receiver represents an identifiable biological letter " @@ -62,7 +62,7 @@ Character >> isDNASequence [ BioIUPACUnambiguousDNA ambiguityCodes includes: self ] ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Character >> isProteinSequence [ " Answer if the receiver represents an identifiable biological letter " @@ -70,7 +70,7 @@ Character >> isProteinSequence [ BioIUPACProtein ambiguityCodes includes: self ] ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Character >> isRNASequence [ " Answer if the receiver represents an identifiable biological letter " diff --git a/repository/BioTools/CharacterSet.extension.st b/repository/BioTools/CharacterSet.extension.st index 95279f2d..175923a8 100644 --- a/repository/BioTools/CharacterSet.extension.st +++ b/repository/BioTools/CharacterSet.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #CharacterSet } +Extension { #name : 'CharacterSet' } -{ #category : #'*BioTools' } +{ #category : '*BioTools' } CharacterSet class >> allCharactersBut: aCollection [ " Answer a set containing all characters except all those contained in aCollection " diff --git a/repository/BioTools/Collection.extension.st b/repository/BioTools/Collection.extension.st index d1aa2873..17c7835c 100644 --- a/repository/BioTools/Collection.extension.st +++ b/repository/BioTools/Collection.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #Collection } +Extension { #name : 'Collection' } -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Collection >> bioHasEqualElements: otherCollection [ "Answer whether the receiver's size is the same as otherCollection's size, and each of the receiver's elements equal the corresponding @@ -15,7 +15,7 @@ Collection >> bioHasEqualElements: otherCollection [ ^ true ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Collection >> dumpToStream: aStream [ " Private - Write the receiver's contents into aStream " @@ -23,7 +23,7 @@ Collection >> dumpToStream: aStream [ ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Collection >> groupByEquality [ | group | @@ -39,7 +39,7 @@ Collection >> groupByEquality [ ^ group ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Collection >> includesBeginWith: aString [ "Answer whether anObject is like one of the receiver's elements." @@ -49,7 +49,7 @@ Collection >> includesBeginWith: aString [ ifFalse: [ each anySatisfy: [ : ss | (ss asUppercase alike: aString asUppercase) > (aString size / 2) asFloat rounded ] ] ] ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Collection >> includesBeginWithAnyOf: aCollection [ " Answer whether any element of aCollection is one of the receiver's elements. " @@ -57,28 +57,28 @@ Collection >> includesBeginWithAnyOf: aCollection [ ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Collection >> includesLike: aString [ "Answer whether anObject is like one of the receiver's elements." ^ self anySatisfy: [ :each | (each asUppercase alike: aString asUppercase) > (aString size / 2) asFloat rounded ] ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Collection >> isBioCollection [ " Answer if receiver is a provided by the BioSmalltalk library " ^ false ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Collection >> isBioSpecialIdentifier [ " Answer if receiver is any of the common biological identifiers " ^ #('pdb' 'bbs' 'gi' 'gnl' 'lcl' 'pat' 'pir' 'prf' 'sp' 'dbj' 'emb' 'gb' 'ref') includes: self ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Collection >> isBiologicalSequence [ " Answer if the receiver represents an identifiable biological letter " @@ -87,21 +87,21 @@ Collection >> isBiologicalSequence [ and: [ self isBioSpecialIdentifier not ] ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Collection >> isDNASequence [ " Answer if the receiver represents a identifiable DNA sequence " ^ self allSatisfy: #isDNASequence ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Collection >> isProteinSequence [ " Answer if the receiver represents a identifiable Protein sequence " ^ self allSatisfy: #isProteinSequence ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Collection >> isRNASequence [ " Answer if the receiver represents a identifiable RNA sequence " diff --git a/repository/BioTools/Dictionary.extension.st b/repository/BioTools/Dictionary.extension.st index 54648255..3e0be505 100644 --- a/repository/BioTools/Dictionary.extension.st +++ b/repository/BioTools/Dictionary.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #Dictionary } +Extension { #name : 'Dictionary' } -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Dictionary >> asBio: aBioCollectionClass [ | collection | @@ -10,7 +10,7 @@ Dictionary >> asBio: aBioCollectionClass [ ^ collection ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Dictionary >> dumpToStream: aStream [ " Private - Write the receiver's contents into aStream " diff --git a/repository/BioTools/FileReference.extension.st b/repository/BioTools/FileReference.extension.st index e20898a5..886e33f1 100644 --- a/repository/BioTools/FileReference.extension.st +++ b/repository/BioTools/FileReference.extension.st @@ -1,13 +1,13 @@ -Extension { #name : #FileReference } +Extension { #name : 'FileReference' } -{ #category : #'*BioTools' } +{ #category : '*BioTools' } FileReference >> includesDtd: aString [ " Answer if aString is a DTD identifierfor the receiver's contents " ^ self contents includesDtd: aString ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } FileReference >> isXML [ " See superimplementor's comment " diff --git a/repository/BioTools/FileSystemDirectoryEntry.extension.st b/repository/BioTools/FileSystemDirectoryEntry.extension.st index 91b2891b..557705d8 100644 --- a/repository/BioTools/FileSystemDirectoryEntry.extension.st +++ b/repository/BioTools/FileSystemDirectoryEntry.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #FileSystemDirectoryEntry } +Extension { #name : 'FileSystemDirectoryEntry' } -{ #category : #'*BioTools' } +{ #category : '*BioTools' } FileSystemDirectoryEntry >> isXML [ " See superimplementor's comment " diff --git a/repository/BioTools/Integer.extension.st b/repository/BioTools/Integer.extension.st index 3a888d66..cebaaa98 100644 --- a/repository/BioTools/Integer.extension.st +++ b/repository/BioTools/Integer.extension.st @@ -1,12 +1,12 @@ -Extension { #name : #Integer } +Extension { #name : 'Integer' } -{ #category : #'*biotools' } +{ #category : '*biotools' } Integer >> alignmentAt: aBioAlignment [ ^ aBioAlignment atAlignment: self ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Integer >> atColumnFromBioAlignment: aBioAlignment [ " See comment in BioAlignment>>atColumn: " @@ -15,7 +15,7 @@ Integer >> atColumnFromBioAlignment: aBioAlignment [ ifFalse: [ self signalInvalidObject: self asString , ' is out of range in the receiver''s sequences' ] ] -{ #category : #'*biotools' } +{ #category : '*biotools' } Integer >> choose: r [ " Calculate n!/(r! * (n-r)!) where n is the receiver " diff --git a/repository/BioTools/Interval.extension.st b/repository/BioTools/Interval.extension.st index 5f5b4661..5fed8f96 100644 --- a/repository/BioTools/Interval.extension.st +++ b/repository/BioTools/Interval.extension.st @@ -1,12 +1,12 @@ -Extension { #name : #Interval } +Extension { #name : 'Interval' } -{ #category : #'*biotools' } +{ #category : '*biotools' } Interval >> alignmentAt: aBioAlignment [ ^ aBioAlignment atAlignments: self ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Interval >> atColumnFromBioAlignment: aBioAlignment [ " See comment in BioAlignment>>atColumn: " diff --git a/repository/BioTools/Magnitude.extension.st b/repository/BioTools/Magnitude.extension.st index 42b6fe64..b98cf0be 100644 --- a/repository/BioTools/Magnitude.extension.st +++ b/repository/BioTools/Magnitude.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #Magnitude } +Extension { #name : 'Magnitude' } -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Magnitude >> dumpToStream: aStream [ " Private - Write the receiver's contents into aStream " diff --git a/repository/BioTools/Object.extension.st b/repository/BioTools/Object.extension.st index 8cc62882..0d5cea90 100644 --- a/repository/BioTools/Object.extension.st +++ b/repository/BioTools/Object.extension.st @@ -1,27 +1,20 @@ -Extension { #name : #Object } +Extension { #name : 'Object' } -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Object class >> allowOpenTranscript [ " Answer if receiver is allowd to open a Transcript window to report log " ^ false ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Object >> allowOpenTranscript [ " See comment in class side " ^ self class allowOpenTranscript ] -{ #category : #'*BioTools' } -Object >> bioLog: aString [ - " Write aString to a streamer " - - ^ self class bioLog: aString -] - -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Object class >> bioLog: aString [ " Write aString to the Transcript " @@ -34,14 +27,14 @@ Object class >> bioLog: aString [ ^ trWindow ] -{ #category : #'*BioTools' } -Object >> bioLog: aString event: aDescriptionString [ - " Write aString and aDescriptionString to a streamer " +{ #category : '*BioTools' } +Object >> bioLog: aString [ + " Write aString to a streamer " - self class bioLog: aString event: aDescriptionString + ^ self class bioLog: aString ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Object class >> bioLog: aString event: aDescriptionString [ " Write aString to the streamer " @@ -54,63 +47,70 @@ Object class >> bioLog: aString event: aDescriptionString [ show: aDescriptionString ] -{ #category : #'*BioTools' } -Object >> bioReader [ - " Answer a BioReader on the receiver " +{ #category : '*BioTools' } +Object >> bioLog: aString event: aDescriptionString [ + " Write aString and aDescriptionString to a streamer " - ^ self + self class bioLog: aString event: aDescriptionString ] -{ #category : #'*BioTools' } -Object >> closeTranscript [ - " See comment in class side " +{ #category : '*BioTools' } +Object >> bioReader [ + " Answer a BioReader on the receiver " - ^ self class closeTranscript + ^ self ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Object class >> closeTranscript [ " Private - Close the system Transcript if opened " Transcript close ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } +Object >> closeTranscript [ + " See comment in class side " + + ^ self class closeTranscript +] + +{ #category : '*BioTools' } Object >> isBiologicalSequence [ " Answer if the receiver represents an identifiable biological letter " ^ false ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Object >> isDNASequence [ " Answer if the receiver represents an identifiable biological sequence " ^ false ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Object >> isProteinSequence [ " Answer if the receiver represents an identifiable biological sequence " ^ false ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Object >> isRNASequence [ " Answer if the receiver represents an identifiable biological sequence " ^ false ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Object >> isXML [ " Answer if the receiver's contents *looks like* XML " ^ false ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Object class >> openTranscript [ " Private - Open the system Transcript if closed " @@ -118,27 +118,27 @@ Object class >> openTranscript [ ifTrue: [ Transcript open ]. ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Object >> openTranscript [ self class openTranscript ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Object class >> signalDuplicateObject: errorString [ " See comment in BioDuplicatedObject " ^ BioDuplicatedObject new signal: errorString ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Object >> signalDuplicateObject: errorString [ " Raise an exception with errorString as description. This message should be sent when a duplicate is found in any context " ^ self class signalDuplicateObject: errorString ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Object class >> signalInvalidObject: errorString [ " Raise an exception with errorString as description. This message should be sent when general unexpected or unwanted behavoir is found. For example : - Empty results @@ -148,7 +148,7 @@ Object class >> signalInvalidObject: errorString [ ^ BioErrorSpecificationObject new signal: errorString ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Object >> signalInvalidObject: errorString [ " Raise an exception with errorString as description. This message should be sent when general unexpected or unwanted behavoir is found. For example : - Empty results @@ -159,31 +159,31 @@ Object >> signalInvalidObject: errorString [ ^ self class signalInvalidObject: errorString ] -{ #category : #'*BioTools' } -Object >> signalNotFound: errorString [ - " Raise an exception with errorString as description. This message should be sent when a requested resource is not available " - - ^ self class signalNotFound: errorString -] - -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Object class >> signalNotFound: errorString [ " Raise an exception with errorString as description. This message should be sent when a requested resource is not available " ^ BioNotFoundObject new signal: errorString ] -{ #category : #'*BioTools' } -Object >> streamer [ - " Answer a Stream. Specialize if necessary " - - ^ self class streamer +{ #category : '*BioTools' } +Object >> signalNotFound: errorString [ + " Raise an exception with errorString as description. This message should be sent when a requested resource is not available " + + ^ self class signalNotFound: errorString ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } Object class >> streamer [ " Answer a default streamer for logging the receiver " ^ Transcript ] + +{ #category : '*BioTools' } +Object >> streamer [ + " Answer a Stream. Specialize if necessary " + + ^ self class streamer +] diff --git a/repository/BioTools/OrderedCollection.extension.st b/repository/BioTools/OrderedCollection.extension.st index dbdbda74..ebcf7e19 100644 --- a/repository/BioTools/OrderedCollection.extension.st +++ b/repository/BioTools/OrderedCollection.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #OrderedCollection } +Extension { #name : 'OrderedCollection' } -{ #category : #'*BioTools' } +{ #category : '*BioTools' } OrderedCollection >> asBio: aBioCollectionClass [ | collection | @@ -10,7 +10,7 @@ OrderedCollection >> asBio: aBioCollectionClass [ ^ collection ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } OrderedCollection >> bioRemove: anObject [ self do: [ : obj | obj remove: anObject ] diff --git a/repository/BioTools/SequenceableCollection.extension.st b/repository/BioTools/SequenceableCollection.extension.st index 4dfec4ae..2ad0ab78 100644 --- a/repository/BioTools/SequenceableCollection.extension.st +++ b/repository/BioTools/SequenceableCollection.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #SequenceableCollection } +Extension { #name : 'SequenceableCollection' } -{ #category : #'*BioTools' } +{ #category : '*BioTools' } SequenceableCollection >> asFastaRecord [ " Answer a " @@ -12,20 +12,20 @@ SequenceableCollection >> asFastaRecord [ ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } SequenceableCollection >> asFileDirectoryCollection [ ^ BioFileCollection withAll: self ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } SequenceableCollection >> rejectFromBioAlignment: aBioAlignment [ " Receiver represents a of taxa () used to filter aBioAlignment " ^ self flatCollect: [ : taxa | taxa rejectFromBioAlignment: aBioAlignment ] ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } SequenceableCollection >> setMicrosatelliteGenotypeFor: aBioMicrosatellite [ " Set the receiver's first two elements as the allele size range of aBioMicrosatellite " diff --git a/repository/BioTools/String.extension.st b/repository/BioTools/String.extension.st index 8c7b8da9..c82f3455 100644 --- a/repository/BioTools/String.extension.st +++ b/repository/BioTools/String.extension.st @@ -1,13 +1,13 @@ -Extension { #name : #String } +Extension { #name : 'String' } -{ #category : #'*BioTools' } +{ #category : '*BioTools' } String >> addToAlignment: aBioAlignment [ " Private - Add the receiver to aBioAlignment " aBioAlignment addSequence: (BioSequence newWith: self) ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } String >> asAccessionStringWithoutVersion [ " Answer a copy of the receiver without the version number " @@ -17,7 +17,7 @@ String >> asAccessionStringWithoutVersion [ ifFalse: [ self ] ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } String >> asAminoacidLetter [ " Answer a representing an aminoacid letter. " @@ -26,7 +26,7 @@ String >> asAminoacidLetter [ ^ self first ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } String >> asAminoacidName [ " Answer the complete name of each receiver's aminoacid. Input may be one or three letter code. " @@ -42,35 +42,35 @@ String >> asAminoacidName [ ifFalse: [ self signalInvalidObject: 'This method only accepts one or three letter codes' ] ] ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } String >> asBioDataFileReference [ " Answer a using the receiver as a file name in the DATA BioSmalltalk subdirectory " ^ ((BioObject dataFilesFullDirectoryName allChildrenMatching: self) select: #isFile) anyOne ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } String >> asBioFileReference [ " Answer a using the receiver as a file name in one of the BioSmalltalk subdirectories " ^ ((self asBioDataFileReference union: self asBioTestFileReference) union: self asBioScriptFileReference) anyOne ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } String >> asBioScriptFileReference [ " Answer a using the receiver as a file name in the SCRIPTS BioSmalltalk subdirectory " ^ ((BioObject scriptsFullDirectoryName allChildrenMatching: self) select: #isFile) anyOne ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } String >> asBioTestFileReference [ " Answer a using the receiver as a file name in the TESTS BioSmalltalk subdirectory " ^ ((BioObject testFilesFullDirectoryName allChildrenMatching: self) select: #isFile) anyOne ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } String >> asDNANucleotide [ " Answer the receiver as a " @@ -78,21 +78,21 @@ String >> asDNANucleotide [ ^ BioDNANucleotide with: self ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } String >> asDNASequence [ " Answer a new Sequence object. Defaults to BioIUPACAmbiguousDNA " ^ self asSequenceForAlphabet: BioIUPACAmbiguousDNA new ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } String >> asDNASimpleSequence [ " Answer a new Sequence object guessing the Alphabet. See #guessAlphabetFrom: for details " ^ self asSequenceForAlphabet: BioDNAAlphabet ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } String >> asFastaRecord [ " Answer a new filled with the receiver's name and sequence. Assume first line is a FASTA identifier line, and subsequent lines contains the sequences possibly separated by CRs " @@ -105,28 +105,28 @@ String >> asFastaRecord [ sequence: parsedSeq asSequence ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } String >> asProteinSequence [ " Answer a new protein sequence object. Alphabet defaults to BioIUPACProteinExtended " ^ self asSequenceForAlphabet: BioIUPACProteinExtended new ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } String >> asRNASequence [ " Answer a new protein sequence object. Alphabet defaults to BioIUPACAmbiguousRNA " ^ self asSequenceForAlphabet: BioIUPACAmbiguousRNA new ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } String >> asSequence [ " Answer a new Sequence object guessing the Alphabet. See #guessAlphabetFrom: for details " ^ BioSequence newWith: self asCondensedString ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } String >> asSequenceForAlphabet: anAlphabet [ " Answer a new Sequence object using anAlphabet. If anAlphabet is null then guess an alphanet using the receiver, see #guessAlphabetFrom: " @@ -135,7 +135,7 @@ String >> asSequenceForAlphabet: anAlphabet [ alphabet: anAlphabet ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } String >> bioReader [ " Answer a BioReader on the receiver " @@ -147,7 +147,7 @@ String >> bioReader [ ifFalse: [ readerClass newFromFlat: self ] ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } String >> dumpToStream: aStream [ " Private - Write the receiver's contents into aStream " @@ -156,7 +156,7 @@ String >> dumpToStream: aStream [ bioCr. ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } String >> hasAmbiguousDNABases [ " Answer if receiver contains ambiguity codes " @@ -164,7 +164,7 @@ String >> hasAmbiguousDNABases [ ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } String >> hasAmbiguousRNABases [ " Answer if receiver contains ambiguity codes " @@ -173,14 +173,14 @@ String >> hasAmbiguousRNABases [ ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } String >> includesDtd: aDtdFilename [ " Private - Answer if receiver's first bytes in header includes aDtdFilename " ^ ((self first: 150) findTokens: $") includes: aDtdFilename ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } String >> instancesOf: aCharacter [ | count | @@ -189,7 +189,7 @@ String >> instancesOf: aCharacter [ ^ count. ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } String >> isAllele [ ^ #( @@ -201,7 +201,7 @@ String >> isAllele [ ) includes: self ] -{ #category : #'*BioTools' } +{ #category : '*BioTools' } String >> rejectFromBioAlignment: aBioAlignment [ " Receiver represents a name of a taxon used to filter aBioAlignment " diff --git a/repository/BioTools/WriteStream.extension.st b/repository/BioTools/WriteStream.extension.st index 267159af..a2639703 100644 --- a/repository/BioTools/WriteStream.extension.st +++ b/repository/BioTools/WriteStream.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #WriteStream } +Extension { #name : 'WriteStream' } -{ #category : #'*biotools' } +{ #category : '*biotools' } WriteStream >> bioCr [ "Append a return character to the receiver accordingly to the platform the receiver is executing in." diff --git a/repository/BioTools/ZnEncodedStream.extension.st b/repository/BioTools/ZnEncodedStream.extension.st index 525dac6c..7ea7ebf2 100644 --- a/repository/BioTools/ZnEncodedStream.extension.st +++ b/repository/BioTools/ZnEncodedStream.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #ZnEncodedStream } +Extension { #name : 'ZnEncodedStream' } -{ #category : #'*BioTools' } +{ #category : '*BioTools' } ZnEncodedStream >> bioCr [ "Append a return character to the receiver accordingly to the platform the receiver is executing in." diff --git a/repository/BioTools/package.st b/repository/BioTools/package.st index ac9a4e50..49c69958 100644 --- a/repository/BioTools/package.st +++ b/repository/BioTools/package.st @@ -1 +1 @@ -Package { #name : #BioTools } +Package { #name : 'BioTools' } From 0d36c76a28abc2a34b526f058038753ab7fceefe Mon Sep 17 00:00:00 2001 From: Hernan Morales Date: Mon, 16 Mar 2026 01:06:34 -0300 Subject: [PATCH 2/3] Disable logging during MetacelloFileDownload load --- .../BaselineOfBioSmalltalk/BaselineOfBioSmalltalk.class.st | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repository/BaselineOfBioSmalltalk/BaselineOfBioSmalltalk.class.st b/repository/BaselineOfBioSmalltalk/BaselineOfBioSmalltalk.class.st index e471b36f..b4980901 100644 --- a/repository/BaselineOfBioSmalltalk/BaselineOfBioSmalltalk.class.st +++ b/repository/BaselineOfBioSmalltalk/BaselineOfBioSmalltalk.class.st @@ -255,10 +255,10 @@ BaselineOfBioSmalltalk >> customProjectAttributes [ { #category : 'doits' } BaselineOfBioSmalltalk >> ensureMetacelloFileDownload [ - Metacello new + EpMonitor disableDuring: [ Metacello new baseline: 'MetacelloFileDownload'; repository: 'github://hernanmd/MetacelloFileDownload'; - load. + load ] ] { #category : 'doits' } From 81d030eed3daaf4e069e885be5016a8ce363ed07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hern=C3=A1n=20Morales=20Durand?= <4825959+hernanmd@users.noreply.github.com> Date: Mon, 16 Mar 2026 04:12:09 -0300 Subject: [PATCH 3/3] Add Hirschberg's algorithm implementation with tests. (#5) Add NeedlemanWunsch dependency. Co-authored-by: Hernan Morales --- .../BaselineOfBioSmalltalk.class.st | 13 +- .../BioTools-Tests/BioAlignmentTest.class.st | 4 +- .../BioTools-Tests/BioAlphabetTest.class.st | 7 +- .../BioTools-Tests/BioCodonTableTest.class.st | 4 +- .../BioTools-Tests/BioHirschbergTest.class.st | 117 ++++++++++++++ .../BioTools-Tests/BioUnknownSeqTest.class.st | 10 +- repository/BioTools/BioAlignment.class.st | 4 +- repository/BioTools/BioHirschberg.class.st | 146 ++++++++++++++++++ 8 files changed, 288 insertions(+), 17 deletions(-) create mode 100644 repository/BioTools-Tests/BioHirschbergTest.class.st create mode 100644 repository/BioTools/BioHirschberg.class.st diff --git a/repository/BaselineOfBioSmalltalk/BaselineOfBioSmalltalk.class.st b/repository/BaselineOfBioSmalltalk/BaselineOfBioSmalltalk.class.st index b4980901..58caffdb 100644 --- a/repository/BaselineOfBioSmalltalk/BaselineOfBioSmalltalk.class.st +++ b/repository/BaselineOfBioSmalltalk/BaselineOfBioSmalltalk.class.st @@ -37,7 +37,8 @@ BaselineOfBioSmalltalk >> baseline: spec [ projectSpecForPolyMath: spec; projectSpecForDataFrame: spec; projectSpecForINIParser: spec; - projectSpecForPetitParser: spec. + projectSpecForPetitParser: spec; + projectSpecForNeedlemanWunsch: spec. "projectSpecForRoassal2: spec." self baselineOSDeps: spec. @@ -109,7 +110,7 @@ BaselineOfBioSmalltalk >> baselineCommonPackages: spec [ package: 'BioSoftwareCatalog' with: [ spec requires: #('BioTools' ). ]; package: 'BioSupport' with: [ spec requires: #('BioTools' 'DataFrame'). ]; package: 'BioTools' with: [ spec - requires: #('CommonUtils' 'StringExtensions' 'PetitParser2Core' 'PolyMath' 'XMLParser'); + requires: #('CommonUtils' 'StringExtensions' 'PetitParser2Core' 'PolyMath' 'XMLParser' 'NeedlemanWunsch'); includes: #('BioPharoCommon') ]; package: 'BioToolsSamples' with: [ spec requires: #('BioTools' 'BioEntrez' 'BioParsers' ). ]; package: 'BioTools-Tests' with: [ spec requires: #('BioTools' ). ]; @@ -333,6 +334,14 @@ BaselineOfBioSmalltalk >> projectSpecForINIParser: spec [ ] +{ #category : 'specs' } +BaselineOfBioSmalltalk >> projectSpecForNeedlemanWunsch: spec [ + + spec + baseline: 'NeedlemanWunsch' + with: [ spec repository: 'github://hernanmd/needleman-wunsch/src' ] +] + { #category : 'specs' } BaselineOfBioSmalltalk >> projectSpecForOsSubprocess: spec [ diff --git a/repository/BioTools-Tests/BioAlignmentTest.class.st b/repository/BioTools-Tests/BioAlignmentTest.class.st index e40b4358..9e91ed07 100644 --- a/repository/BioTools-Tests/BioAlignmentTest.class.st +++ b/repository/BioTools-Tests/BioAlignmentTest.class.st @@ -4,9 +4,9 @@ Class { #instVars : [ 'align' ], - #category : 'BioTools-Tests-Core', + #category : 'BioTools-Tests-Align', #package : 'BioTools-Tests', - #tag : 'Core' + #tag : 'Align' } { #category : 'accessing' } diff --git a/repository/BioTools-Tests/BioAlphabetTest.class.st b/repository/BioTools-Tests/BioAlphabetTest.class.st index 44af8d90..4fe9271d 100644 --- a/repository/BioTools-Tests/BioAlphabetTest.class.st +++ b/repository/BioTools-Tests/BioAlphabetTest.class.st @@ -1,12 +1,9 @@ Class { #name : 'BioAlphabetTest', #superclass : 'BioAbstractTest', - #instVars : [ - 'alphabet' - ], - #category : 'BioTools-Tests-Biological', + #category : 'BioTools-Tests-Alphabets', #package : 'BioTools-Tests', - #tag : 'Biological' + #tag : 'Alphabets' } { #category : 'testing' } diff --git a/repository/BioTools-Tests/BioCodonTableTest.class.st b/repository/BioTools-Tests/BioCodonTableTest.class.st index 2c7d0bad..aec0b474 100644 --- a/repository/BioTools-Tests/BioCodonTableTest.class.st +++ b/repository/BioTools-Tests/BioCodonTableTest.class.st @@ -4,9 +4,9 @@ Class { #instVars : [ 'table' ], - #category : 'BioTools-Tests-Biological', + #category : 'BioTools-Tests-Alphabets', #package : 'BioTools-Tests', - #tag : 'Biological' + #tag : 'Alphabets' } { #category : 'running' } diff --git a/repository/BioTools-Tests/BioHirschbergTest.class.st b/repository/BioTools-Tests/BioHirschbergTest.class.st new file mode 100644 index 00000000..5525fdc5 --- /dev/null +++ b/repository/BioTools-Tests/BioHirschbergTest.class.st @@ -0,0 +1,117 @@ +Class { + #name : 'BioHirschbergTest', + #superclass : 'TestCase', + #category : 'BioTools-Tests-Align', + #package : 'BioTools-Tests', + #tag : 'Align' +} + +{ #category : 'tests' } +BioHirschbergTest >> testAlignEmptyWithEmpty [ + | result | + result := BioHirschberg new align: '' with: ''. + self assert: result firstSequence equals: ''. + self assert: result secondSequence equals: ''. +] + +{ #category : 'tests' } +BioHirschbergTest >> testAlignEmptyWithNonEmpty [ + | result | + result := BioHirschberg new align: '' with: 'GATTACA'. + self assert: result firstSequence equals: '-------'. + self assert: result secondSequence equals: 'GATTACA'. +] + +{ #category : 'tests' } +BioHirschbergTest >> testAlignIdenticalSequences [ + | result | + result := BioHirschberg new align: 'ACGTACGT' with: 'ACGTACGT'. + self assert: result firstSequence equals: 'ACGTACGT'. + self assert: result secondSequence equals: 'ACGTACGT'. +] + +{ #category : 'tests' } +BioHirschbergTest >> testAlignNonEmptyWithEmpty [ + | result | + result := BioHirschberg new align: 'GATTACA' with: ''. + self assert: result firstSequence equals: 'GATTACA'. + self assert: result secondSequence equals: '-------'. +] + +{ #category : 'tests' } +BioHirschbergTest >> testAlignSingleCharacterMismatch [ + + | result | + result := BioHirschberg new align: 'A' with: 'T'. + self assert: result firstSequence size equals: 1. + self assert: result secondSequence size equals: 1. + self assert: result firstSequence equals: 'A'. + self assert: result secondSequence equals: 'T' +] + +{ #category : 'tests' } +BioHirschbergTest >> testBaseCaseManyAgainstOne [ + + | result | + result := BioHirschberg new align: 'GATTACA' with: 'A'. + self + assert: result firstSequence size + equals: result secondSequence size. + self assert: (result secondSequence occurrencesOf: $A) equals: 1 +] + +{ #category : 'tests' } +BioHirschbergTest >> testBaseCaseOneAgainstMany [ + + | result | + result := BioHirschberg new align: 'A' with: 'GATTACA'. + self + assert: result firstSequence size + equals: result secondSequence size. + self assert: (result firstSequence occurrencesOf: $A) equals: 1 +] + +{ #category : 'tests' } +BioHirschbergTest >> testOnlyGapCharacterInsertedForPadding [ + + | result allowed | + result := BioHirschberg new align: 'GAT' with: 'GATTACA'. + allowed := (Set withAll: 'GATTACA') , (Set with: $-). + self assert: + (result firstSequence allSatisfy: [ :ch | allowed includes: ch ]). + self assert: + (result secondSequence allSatisfy: [ :ch | allowed includes: ch ]) +] + +{ #category : 'tests' } +BioHirschbergTest >> testResultSequencesHaveSameLength [ + + | result | + result := BioHirschberg new align: 'GATTACA' with: 'GCATGCU'. + self + assert: result firstSequence size + equals: result secondSequence size +] + +{ #category : 'tests' } +BioHirschbergTest >> testSequencesWithGaps [ + + | result | + result := BioHirschberg new align: 'GATTACA' with: 'GAATACA'. + self assert: (result firstSequence includesSubstring: '-'). + self assert: (result secondSequence includesSubstring: '-') +] + +{ #category : 'tests' } +BioHirschbergTest >> testSequencesWithRepeatedGaps [ + + | result | + result := BioHirschberg new align: 'G--A' with: 'GA--'. + + "Alignments should be of equal length" + self + assert: result firstSequence size + equals: result secondSequence size. + "Alignment contains gaps as expected" + self assert: (result firstSequence includesSubstring: '-') +] diff --git a/repository/BioTools-Tests/BioUnknownSeqTest.class.st b/repository/BioTools-Tests/BioUnknownSeqTest.class.st index 9bcee89b..4ab0c58a 100644 --- a/repository/BioTools-Tests/BioUnknownSeqTest.class.st +++ b/repository/BioTools-Tests/BioUnknownSeqTest.class.st @@ -22,11 +22,13 @@ BioUnknownSeqTest >> setUp [ { #category : 'testing' } BioUnknownSeqTest >> testAlphabet [ - self assert: ( self sequence alphabet isKindOf: BioAlphabet ). - self assert: ( self sequence unknownLetter = BioAlphabet new defaultUnknownElement ). + self assert: (self sequence alphabet isKindOf: BioAlphabet). + self + assert: self sequence unknownLetter + equals: BioAlphabet new defaultUnknownElement. self sequence unknownLetter: $?. - self assert: ( self sequence alphabet isKindOf: BioAlphabet ). - self assert: self sequence unknownLetter = $? + self assert: (self sequence alphabet isKindOf: BioAlphabet). + self assert: self sequence unknownLetter equals: $? ] { #category : 'testing' } diff --git a/repository/BioTools/BioAlignment.class.st b/repository/BioTools/BioAlignment.class.st index dcffbb6a..227f6395 100644 --- a/repository/BioTools/BioAlignment.class.st +++ b/repository/BioTools/BioAlignment.class.st @@ -13,9 +13,9 @@ Class { 'consensusStrategy', 'isReference' ], - #category : 'BioTools-Core', + #category : 'BioTools-Align', #package : 'BioTools', - #tag : 'Core' + #tag : 'Align' } { #category : 'accessing' } diff --git a/repository/BioTools/BioHirschberg.class.st b/repository/BioTools/BioHirschberg.class.st new file mode 100644 index 00000000..f14016c7 --- /dev/null +++ b/repository/BioTools/BioHirschberg.class.st @@ -0,0 +1,146 @@ +" +Hirschberg's algorithm is a more space-efficient modification of the Needleman-Wunsch algorithm, designed for optimal sequence alignment. It uses a divide-and-conquer approach to achieve linear space complexity while maintaining the same time complexity as Needleman-Wunsch. + +This implementation reduces space complexity from O(nm) to O(min(n,m)) while maintaining O(nm) time complexity. +" +Class { + #name : 'BioHirschberg', + #superclass : 'ALNeedlemanWunsch', + #category : 'BioTools-Align', + #package : 'BioTools', + #tag : 'Align' +} + +{ #category : 'initialization' } +BioHirschberg >> align: sequence1 with: sequence2 [ + + | aligned | + self + firstSequence: sequence1; + secondSequence: sequence2. + + (sequence1 isEmpty and: [ sequence2 isEmpty ]) ifTrue: [ ^ self ]. + + aligned := self recursiveAlignment: sequence1 with: sequence2. + self finalize: aligned first reversed with: aligned second reversed. + ^ self +] + +{ #category : 'accessing' } +BioHirschberg >> alignmentScoreOf: alignedA with: alignedB using: aligner [ + + | score | + score := 0. + 1 to: alignedA size do: [ :i | + score := score + + + (aligner + matchScore: (alignedA at: i) + with: (alignedB at: i)) ]. + ^ score +] + +{ #category : 'transforming' } +BioHirschberg >> backwardPass: aSeq with: bSeq [ + "R[j] = score of aligning reverse(aSeq) with reverse(bSeq[1..j]) mapped back" + + ^ (self forwardPass: aSeq reversed with: bSeq reversed) reversed +] + +{ #category : 'transforming' } +BioHirschberg >> forwardPass: aSeq with: bSeq [ + + | current previous diagonal up left | + current := Array new: bSeq size + 1. + 0 to: bSeq size do: [ :j | + current at: j + 1 put: j * self gapPenalty ]. + + aSeq doWithIndex: [ :charA :i | + previous := current copy. + current at: 1 put: i * self gapPenalty. + 1 to: bSeq size do: [ :j | + diagonal := (previous at: j) + + (self matchScore: charA with: (bSeq at: j)). + up := (previous at: j + 1) + self gapPenalty. + left := (current at: j) + self gapPenalty. + current at: j + 1 put: ((diagonal max: up) max: left) ] ]. + ^ current +] + +{ #category : 'initialization' } +BioHirschberg >> initialize [ + + super initialize. + gapCharacter := $- +] + +{ #category : 'transforming' } +BioHirschberg >> needlemanWunschForSmallCases: aSeq with: bSeq [ + + | nw | + nw := self class superclass new. + nw + matchAward: self matchAward; + mismatchPenalty: self mismatchPenalty; + gapPenalty: self gapPenalty; + gapCharacter: self gapCharacter; + align: aSeq with: bSeq. + ^ { + nw firstSequence. + nw secondSequence } +] + +{ #category : 'transforming' } +BioHirschberg >> recursiveAlignment: aSeq with: bSeq [ + + | n m mid leftA rightA scoreL scoreR split leftPart rightPart | + n := aSeq size. + m := bSeq size. + + n = 0 ifTrue: [ + ^ { + (String new: m withAll: self gapCharacter). + bSeq } ]. + + m = 0 ifTrue: [ + ^ { + aSeq. + (String new: n withAll: self gapCharacter) } ]. + + (n = 1 or: [ m = 1 ]) ifTrue: [ + ^ self needlemanWunschForSmallCases: aSeq with: bSeq ]. + + mid := n // 2. + leftA := aSeq copyFrom: 1 to: mid. + rightA := aSeq copyFrom: mid + 1 to: n. + + scoreL := self forwardPass: leftA with: bSeq. + scoreR := self backwardPass: rightA with: bSeq. + split := self splitIndexFromForward: scoreL backward: scoreR. + + leftPart := self + recursiveAlignment: leftA + with: (bSeq copyFrom: 1 to: split). + rightPart := self + recursiveAlignment: rightA + with: (bSeq copyFrom: split + 1 to: m). + + ^ { + (leftPart first , rightPart first). + (leftPart second , rightPart second) } +] + +{ #category : 'transforming' } +BioHirschberg >> splitIndexFromForward: scoreL backward: scoreR [ + + | m bestIndex bestScore candidate | + m := scoreL size - 1. + bestIndex := 0. + bestScore := SmallInteger minVal. + 0 to: m do: [ :j | + candidate := (scoreL at: j + 1) + (scoreR at: m - j + 1). + candidate > bestScore ifTrue: [ + bestScore := candidate. + bestIndex := j ] ]. + ^ bestIndex +]