Skip to content

Commit 778d5f9

Browse files
committed
Biostrings 2.79.1: Post-release cleanup
Remove all the functions that went to the pwalign package in BioC 3.19, that is: writePairwiseAlignments(), nucleotideSubstitutionMatrix(), errorSubstitutionMatrices(), qualitySubstitutionMatrices(), insertion(), deletion(), unaligned(), aligned(), indel(), nindel(), PairwiseAlignments(), pattern(), alignedPattern(), alignedSubject(), PairwiseAlignmentsSingleSubject, nedit(), mismatchTable(), mismatchSummary(), compareStrings(), pid(), pairwiseAlignment(), stringDist(). Note that these functions got formally deprecated in Biostrings in BioC 3.21 and defunct in BioC 3.22. Additionally, the XStringPartialMatches class and following functions are now gone after being defunct in BioC 3.22 or non-functional for years: matchprobes(), subpatterns(), pmatchPattern(), lcsubstr().
1 parent fb3d330 commit 778d5f9

18 files changed

+138
-718
lines changed

DESCRIPTION

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ biocViews: SequenceMatching, Alignment, Sequencing, Genetics,
77
DataImport, DataRepresentation, Infrastructure
88
URL: https://bioconductor.org/packages/Biostrings
99
BugReports: https://github.com/Bioconductor/Biostrings/issues
10-
Version: 2.79.0
10+
Version: 2.79.1
1111
License: Artistic-2.0
1212
Encoding: UTF-8
1313
Authors@R: c(
@@ -33,7 +33,7 @@ Authors@R: c(
3333
person("Jen", "Wokaty", role="ctb",
3434
comment="Converted 'matchprobes' vignette from Sweave to RMarkdown"),
3535
person("Erik", "Wright", role="ctb"))
36-
Depends: R (>= 4.0.0), BiocGenerics (>= 0.37.0), S4Vectors (>= 0.27.12),
36+
Depends: R (>= 4.1.0), BiocGenerics (>= 0.37.0), S4Vectors (>= 0.27.12),
3737
IRanges (>= 2.31.2), XVector (>= 0.37.1), Seqinfo
3838
Imports: methods, utils, grDevices, stats, crayon
3939
LinkingTo: S4Vectors, IRanges, XVector
@@ -89,11 +89,10 @@ Collate: utils.R
8989
findPalindromes.R
9090
PDict-class.R
9191
matchPDict.R
92-
XStringPartialMatches-class.R
9392
XStringQuality-class.R
9493
QualityScaledXStringSet.R
95-
pmatchPattern.R
94+
lcsuffix.R
9695
MultipleAlignment.R
97-
matchprobes.R
98-
moved_to_pwalign.R
96+
longestConsecutive.R
97+
predefined_scoring_matrices.R
9998
zzz.R

NAMESPACE

Lines changed: 11 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ exportMethods(
104104
### getSeq.R
105105
### letterFrequency.R
106106
### dinucleotideFrequencyTest.R
107+
### lcsuffix.R
107108
### chartr.R
108109
### reverse.R
109110
### translate.R
@@ -140,12 +141,15 @@ export(
140141
oligonucleotideTransitions,
141142
twoWayAlphabetFrequency,
142143

143-
## chartr.R:
144-
replaceAmbiguities,
145-
146144
## dinucleotideFrequencyTest.R
147145
dinucleotideFrequencyTest,
148146

147+
## lcsuffix.R:
148+
lcprefix, lcsuffix,
149+
150+
## chartr.R:
151+
replaceAmbiguities,
152+
149153
## reverseComplement.R:
150154
complement, reverseComplement,
151155

@@ -188,6 +192,7 @@ exportMethods(
188192
oligonucleotideFrequency,
189193
nucleotideFrequencyAt,
190194
dinucleotideFrequencyTest,
195+
lcprefix, lcsuffix,
191196
chartr,
192197
reverse, complement, reverseComplement,
193198
codons, translate,
@@ -294,14 +299,11 @@ exportMethods(
294299
### ==========================================================================
295300
### STRING ALIGNMENT
296301
### --------------------------------------------------------------------------
297-
### XStringPartialMatches-class.R
298302
### XStringQuality-class.R
299303
### QualityScaledXStringSet.R
300-
### pmatchPattern.R
301304
### MultipleAlignment.R
302305

303306
exportClasses(
304-
XStringPartialMatches,
305307
XStringQuality, PhredQuality, SolexaQuality, IlluminaQuality,
306308
QualityScaledXStringSet,
307309
QualityScaledBStringSet, QualityScaledDNAStringSet,
@@ -311,9 +313,6 @@ exportClasses(
311313
)
312314

313315
export(
314-
## XStringPartialMatches-class.R:
315-
subpatterns,
316-
317316
## XStringQuality-class.R:
318317
PhredQuality, SolexaQuality, IlluminaQuality,
319318
encoding,
@@ -324,9 +323,6 @@ export(
324323
QualityScaledRNAStringSet, QualityScaledAAStringSet,
325324
readQualityScaledDNAStringSet, writeQualityScaledXStringSet,
326325

327-
## pmatchPattern.R:
328-
lcprefix, lcsuffix, pmatchPattern, lcsubstr,
329-
330326
## MultipleAlignment.R:
331327
DNAMultipleAlignment,
332328
RNAMultipleAlignment,
@@ -349,11 +345,9 @@ exportMethods(
349345
show, summary,
350346
start, end, width,
351347
Views,
352-
subpatterns,
353348
quality, encoding,
354349
parallel_slot_names,
355350
parallelVectorNames,
356-
lcprefix, lcsuffix, pmatchPattern, lcsubstr,
357351
nchar, names, "names<-", "[[", windows,
358352
consensusMatrix, consensusString,
359353
alphabetFrequency, as.list,
@@ -367,39 +361,18 @@ exportMethods(
367361

368362

369363
### ==========================================================================
370-
### STUFF THAT BELONGED ORIGINALLY TO OLD matchprobes PACKAGE AND IS NOW
371-
### SUPERSEDED BY SOME NATIVE Biostrings FUNCTIONALITY
364+
### MISCELLANEOUS
372365
### --------------------------------------------------------------------------
373-
### matchprobes.R
366+
### longestConsecutive.R
374367

375368
export(
376-
longestConsecutive,
377-
matchprobes
369+
longestConsecutive
378370
)
379371

380372

381373
### ==========================================================================
382374
### STUFF THAT HAS MOVED TO THE pwalign PACKAGE
383375
### --------------------------------------------------------------------------
384376

385-
export(
386-
writePairwiseAlignments,
387-
nucleotideSubstitutionMatrix,
388-
errorSubstitutionMatrices,
389-
qualitySubstitutionMatrices,
390-
391-
insertion, deletion,
392-
unaligned, aligned, indel, nindel,
393-
PairwiseAlignments, pattern, alignedPattern, alignedSubject,
394-
PairwiseAlignmentsSingleSubject,
395-
nedit,
396-
mismatchTable, mismatchSummary,
397-
compareStrings,
398-
pid,
399-
pairwiseAlignment,
400-
stringDist,
401-
print.moved_to_pwalign_pkg
402-
)
403-
404377
S3method(print, moved_to_pwalign_pkg)
405378

R/XStringPartialMatches-class.R

Lines changed: 0 additions & 73 deletions
This file was deleted.

R/lcsuffix.R

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
### =========================================================================
2+
### Find Longest Common Prefix/Suffix
3+
### -------------------------------------------------------------------------
4+
5+
6+
### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
7+
### Longest Common Prefix
8+
###
9+
10+
### 's1' and 's2' must be XString objects containing sequences of the same
11+
### type. Return the length (integer) of the Longest Common Prefix.
12+
XString.lcprefix <- function(s1, s2)
13+
{
14+
.Call2("lcprefix", s1@shared@xp, s1@offset, s1@length,
15+
s2@shared@xp, s2@offset, s2@length,
16+
PACKAGE="Biostrings")
17+
}
18+
19+
setGeneric("lcprefix", signature=c("s1", "s2"),
20+
function(s1, s2) standardGeneric("lcprefix")
21+
)
22+
setMethod("lcprefix", signature(s1="character", s2="character"),
23+
function(s1, s2)
24+
XString.lcprefix(BString(s1), BString(s2))
25+
)
26+
setMethod("lcprefix", signature(s1="character", s2="XString"),
27+
function(s1, s2)
28+
XString.lcprefix(XString(seqtype(s2), s1), s2)
29+
)
30+
setMethod("lcprefix", signature(s1="XString", s2="character"),
31+
function(s1, s2)
32+
XString.lcprefix(s1, XString(seqtype(s1), s2))
33+
)
34+
setMethod("lcprefix", signature(s1="XString", s2="XString"),
35+
function(s1, s2)
36+
{
37+
if (seqtype(s1) != seqtype(s2))
38+
stop("'s1' and 's2' must be XString objects containing ",
39+
"sequences of the same type")
40+
XString.lcprefix(s1, s2)
41+
}
42+
)
43+
44+
45+
### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
46+
### Longest Common Suffix
47+
###
48+
49+
### 's1' and 's2' must be XString objects containing sequences of the same
50+
### type. Return the length (integer) of the Longest Common Suffix.
51+
XString.lcsuffix <- function(s1, s2)
52+
{
53+
.Call2("lcsuffix", s1@shared@xp, s1@offset, s1@length,
54+
s2@shared@xp, s2@offset, s2@length,
55+
PACKAGE="Biostrings")
56+
}
57+
58+
setGeneric("lcsuffix", signature=c("s1", "s2"),
59+
function(s1, s2) standardGeneric("lcsuffix")
60+
)
61+
setMethod("lcsuffix", signature(s1="character", s2="character"),
62+
function(s1, s2)
63+
XString.lcsuffix(BString(s1), BString(s2))
64+
)
65+
setMethod("lcsuffix", signature(s1="character", s2="XString"),
66+
function(s1, s2)
67+
XString.lcsuffix(XString(seqtype(s2), s1), s2)
68+
)
69+
setMethod("lcsuffix", signature(s1="XString", s2="character"),
70+
function(s1, s2)
71+
XString.lcsuffix(s1, XString(seqtype(s1), s2))
72+
)
73+
setMethod("lcsuffix", signature(s1="XString", s2="XString"),
74+
function(s1, s2)
75+
{
76+
if (seqtype(s1) != seqtype(s2))
77+
stop("'s1' and 's2' must be XString objects containing ",
78+
"sequences of the same type")
79+
XString.lcsuffix(s1, s2)
80+
}
81+
)
82+

R/longestConsecutive.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
longestConsecutive <- function(seq, letter) {
2+
.Call2("MP_longestConsecutive", seq, letter, PACKAGE="Biostrings")
3+
}
4+

R/matchprobes.R

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)