Last data update: 2014.03.03

R: Align sequences via clustalo
alignSequencesR Documentation

Align sequences via clustalo

Description

Align sequences for an object of class LowMACA

Usage

alignSequences(object, clustalo_filename=NULL , mail=NULL , 
	perlCommand="perl", use_hmm=FALSE, datum=FALSE)

Arguments

object

an object of class LowMACA containing at least 2 sequences.

clustalo_filename

a character string that contains the file name where clustal omega alignment file will be stored. In case it's NULL no file will be written. Default=NULL

mail

a character string indicating the email address where error report should be sent in web mode

perlCommand

a character string containing the path to Perl executable. if missing, "perl" will be used as default

use_hmm

When analysing Pfam sequences, it is possible to use the Hidden Markov Model (HMM) of the specific Pfam to align the sequences. Default is FALSE.

datum

When analysing Pfam sequences, use all the genes that belong to the Pfam to generate the alignment. This creates a unique mapping between individual residues and consensus sequence, disregarding the set of sequences that are selected for the analysis. Default is FALSE.

Details

This method launches a system call to clustalo aligner and optionally creates a fasta file in clustal format. A warning is returned if at least one sequence has a pairwise similarity below 20% to any other sequence. If only one sequence is passed to alignSequences, the alignment will be skipped, but no warning will be raised. If mail is not NULL, a local installation of clustal omega is no longer required and the alignment is performed using clustal omega EBI web service. A limit of 2000 sequences is set in this case and perl must be installed in the system

Value

The method returns an object of class LowMACA updating the slot alignment. See lmAlignment

Warning

When a sequence has a similarity below 20%, a warning is raised. In order to produce strong results in terms of conservation of multiple mutations, consider to remove that sequence from the analysis. The alignment will obviously change.

Author(s)

Stefano de Pretis, Giorgio Melloni

References

Trident Score Clustal Omega Clustal Omega Web Service

See Also

getMutations , mapMutations , setup

Examples

#Create an object of class LowMACA for RAS domain family
lm <- newLowMACA(pfam="PF00071" , genes=c("KRAS" , "NRAS" , "HRAS"))
#Align sequences using local installation of clustalo
lm <- alignSequences(lm)
#Web service clustalomega aligner
lm <- alignSequences(lm , mail="lowmaca@gmail.com")
#Use HMM to align
lm <- alignSequences(lm , use_hmm=TRUE)
#Use "datum"
lm <- alignSequences(lm , datum=TRUE)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(LowMACA)
Checking if clustalo is in the PATH...
Checking perl installation...
Checking perl modules XML::Simple and LWP...
Can't locate XML/Simple.pm in @INC (you may need to install the XML::Simple module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .).
BEGIN failed--compilation aborted.
Warning messages:
1: In .ClustalChecks(ClustalCommand = "clustalo") :
  Clustal Omega is not in the PATH:
You can either change clustalo command using lmParams function or use the web service. See ?setup
2: running command '/usr/bin/perl -MXML::Simple -e 1' had status 2 
3: In .PerlModuleChecks(stop = FALSE, perl = "perl") :
  XML::Simple module for perl is not installed. 
            If you don't want to install a local clustal omega and use the web service, XML::Simple is required

> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/LowMACA/alignSequences.Rd_%03d_medium.png", width=480, height=480)
> ### Name: alignSequences
> ### Title: Align sequences via clustalo
> ### Aliases: alignSequences
> 
> ### ** Examples
> 
> #Create an object of class LowMACA for RAS domain family
> lm <- newLowMACA(pfam="PF00071" , genes=c("KRAS" , "NRAS" , "HRAS"))
All Gene Symbols correct!
> #Align sequences using local installation of clustalo
> lm <- alignSequences(lm)
Aligning sequences...
Error in .clustalOAlign(genesData, clustal_cmd, clustalo_filename, mail,  : 
  Clustal Omega command not found. clustalo is not in your PATH or it was not installed
Calls: alignSequences -> alignSequences -> .clustalOAlign
Execution halted