Updated logic

This commit is contained in:
hyginn 2017-11-16 16:01:56 -05:00
parent 4bbf663eca
commit 62a1a76558

View File

@ -3,12 +3,13 @@
# Purpose: A Bioinformatics Course: # Purpose: A Bioinformatics Course:
# R code accompanying the BIN-ALI-Optimal_sequence_alignment unit. # R code accompanying the BIN-ALI-Optimal_sequence_alignment unit.
# #
# Version: 1.2 # Version: 1.3
# #
# Date: 2017 09 - 2017 11 # Date: 2017 09 - 2017 11
# Author: Boris Steipe (boris.steipe@utoronto.ca) # Author: Boris Steipe (boris.steipe@utoronto.ca)
# #
# Versions: # Versions:
# 1.3 Updated confirmation task with correct logic
# 1.2 Added missing load of seqinr package # 1.2 Added missing load of seqinr package
# 1.1 Update annotation file logic - it could already have been # 1.1 Update annotation file logic - it could already have been
# prepared in the BIN-FUNC-Annotation unit. # prepared in the BIN-FUNC-Annotation unit.
@ -32,16 +33,16 @@
#TOC> #TOC>
#TOC> Section Title Line #TOC> Section Title Line
#TOC> -------------------------------------------------------------------- #TOC> --------------------------------------------------------------------
#TOC> 1 Prepare 49 #TOC> 1 Prepare 50
#TOC> 2 Biostrings Pairwise Alignment 70 #TOC> 2 Biostrings Pairwise Alignment 71
#TOC> 2.1 Optimal global alignment 88 #TOC> 2.1 Optimal global alignment 89
#TOC> 2.2 Optimal local alignment 151 #TOC> 2.2 Optimal local alignment 152
#TOC> 3 APSES Domain annotation by alignment 175 #TOC> 3 APSES Domain annotation by alignment 176
#TOC> 4 Update your database script 256 #TOC> 4 Update your database script 257
#TOC> 4.1 Preparing an annotation file ... 262 #TOC> 4.1 Preparing an annotation file ... 263
#TOC> 4.1.1 If you HAVE NOT done the BIN-FUNC-Annotation unit 264 #TOC> 4.1.1 If you HAVE NOT done the BIN-FUNC-Annotation unit 265
#TOC> 4.1.2 If you HAVE done the BIN-FUNC-Annotation unit 307 #TOC> 4.1.2 If you HAVE done the BIN-FUNC-Annotation unit 308
#TOC> 4.2 Execute and Validate 331 #TOC> 4.2 Execute and Validate 332
#TOC> #TOC>
#TOC> ========================================================================== #TOC> ==========================================================================
@ -342,11 +343,9 @@ aliApses@subject@range@start + aliApses@subject@range@width - 1
# The following commands should retrieve the correct start and end # The following commands should retrieve the correct start and end
# coordinates and sequence of the MBP1_MYSPE APSES domain: # coordinates and sequence of the MBP1_MYSPE APSES domain:
sel <- myDB$protein$name == paste("MBP1_", biCode(MYSPE), sep = "") sel <- which(myDB$protein$name == paste("MBP1_", biCode(MYSPE), sep = ""))
aaMBP1_MYSPE <- AAString(myDB$protein$sequence[sel])
(proID <- myDB$protein$ID[sel])
(proID <- myDB$protein$ID[myDB$protein$name == "MBP1_<MYSSPE>"]) # <<< EDIT
(ftrID <- myDB$feature$ID[myDB$feature$name == "APSES fold"]) (ftrID <- myDB$feature$ID[myDB$feature$name == "APSES fold"])
(fanID <- myDB$annotation$ID[myDB$annotation$proteinID == proID & (fanID <- myDB$annotation$ID[myDB$annotation$proteinID == proID &
myDB$annotation$featureID == ftrID]) myDB$annotation$featureID == ftrID])