Julian

Since no one has answered this all day I will tell you how I would do it.
 Basically what you want to do is subset your data and keep only the taxa
whose names are not found on your list of bad taxa.  This is a pretty
straightforward problem of subsetting your data.  Here is a four line
solution to your problem:

  alignment <- read.FASTA("dna.fasta")                 ## read the alignment
  bad.taxa <- read.csv("rogues.csv",header=F)[,1]  ## pull in the column of
csv with taxa names (I assume its column 1)
  `%ni%` = Negate(`%in%`)                                   ## create a
function "not an element in"
  stable.taxa.alignment <- alignment[names(alignment) %ni% bad.taxa]  ##
save only sequences != to rogues

hope this is helpful

cheers


On Tue, May 14, 2013 at 3:48 PM, Julian Aguirre-Santoro <
jaaguirr...@gmail.com> wrote:

> Dear all,
>
>
>
> I have a list of “Rogue taxa” that I want to remove from my dataset in
> order to improve the support of my phylogenetic hypothesis.  I can´t figure
> out how to match that list of rogue taxa (which I have as a .csv file) with
> my original DNA sequence matrix (which I have as DNAbin object), so that I
> can remove the problematic species and realign my sequences again.
>
>
>
> Thank you!
>
>
>
> Julián
>         [[alternative HTML version deleted]]
>
>
> _______________________________________________
> R-sig-phylo mailing list - R-sig-phylo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
> Searchable archive at
> http://www.mail-archive.com/r-sig-phylo@r-project.org/
>



-- 
*Heath Blackmon
Graduate Teaching Assistant
Dept of Biology - Box 19498
Univ. of Texas, Arlington
Arlington, TX 76019
Office: ERB450
Phone 682-444-0538
*

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

Reply via email to