Question: Delete certain nucleotide positions in multiple nucleotide alignment
0
gravatar for mariasv1
2 days ago by
mariasv10
mariasv10 wrote:

Hi all,

I have a large multiple nucleotide alignment, and I need to delete specific nucleotide positions from each sequence (basically I need to delete several columns of nucleotides). Someone familiar with a sufficient way to do this?

I was thinking to read an alignment as data.frame in R, and then delete selected columns. But I am having troubles to separate nucleotides by columns.

what I have now:

mydata<-readDNAStringSet("myalignmet.fas")
names<-names(mydata)
sequence<-paste(mydata)
ptid<-names
df<-data.frame(names, sequence)
df$sequence<-as.character(df$sequence)
df2$sequence<-strsplit(df2$sequence, " ")

I am getting a column df$sequence as c("A", "C", "G", "T", ...).

Thanks in advance, Maria

alignment R • 89 views
ADD COMMENTlink modified 2 days ago by WouterDeCoster35k • written 2 days ago by mariasv10

How do you determine which to delete? Do you know the column numbers? I have edited your title to make it more specific.

ADD REPLYlink modified 2 days ago • written 2 days ago by WouterDeCoster35k

Yes, I have specific nucleotide positions which I want to delete (they associate with resistance)

ADD REPLYlink modified 2 days ago • written 2 days ago by mariasv10

There probably is a way to do this in R, but I'd do it in Python. Do you know any Python?

ADD REPLYlink written 2 days ago by WouterDeCoster35k

column wise deletion from an MSA can be done in bioedit mariasv1

ADD REPLYlink written 2 days ago by cpad011210k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1696 users visited in the last hour