knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
First thing the software needs is the sequence files and sequence names.
library(synal) library(Biostrings) specNames <- c('Scer','Spar','Smik','Skud','Sbay','Sarb') filename <- system.file('examples','exampleAlignment.fa',package='synal') aln <- readDNAStringSet(filename)
After you read the alignment file and sequence names, the ORF of interest should be given. If you are interested in an S.cerevisiae annotated ORF, you can find the sequence using findYgeneSeq function.
ygene <- findYGeneSeq('YBR196C-A')
After giving correct inputs, it is easy to get subalignments and Amino acid translations.
dnalist <- align(aln,'YBR196C-A',ygeneSeq = ygene) DNAStr <- dnalist$dnaAlignmentList[[1]] start <- dnalist$dnaAlignmentList[[2]] stop <- dnalist$dnaAlignmentList[[3]] subalignment <- subseq(DNAStr,start,stop) aa_alignment <- dnalist$aa_alignment
if you are interested in finding all overllaping ORFs with your ORF of interest you can do so.
types<-specNames#c('scer','Spar','Smik','Skud','Sbay','Sarb') vec <- c(1,1,1,0,0,0) types <- types[vec>0] homologs <- findHomolog(DNAStr[vec>0], start, stop, ygene, types, orfName = 'YBR196C-A') homologs
todo:add example inputs to use in analyze function
#dataTable <- analyze('../../synal_deneme/','YBR013C',types)
finally all of the above can be done using a single function for all the sequences in the given alignment file
#dataTable <- alignAnalyze('~/Downloads/combined/YBR013C/YBR013C_alignment.fa','YBR013C',outputDirectory = '../../synal_deneme/',specNames = specNames)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.