This is a test version of Biostars. For the public version, visit https://www.biostars.org.
compare two sequences of a csv file

I have a csv file with a column which contains the gapped sequences then a column with the reference sequence and a column with the mutations (it makes appear that the mutatins between the gapped sequence and the reference sequence: thus when there is match it is a - that there is and when there is mutation there is the amino-acid of the mutated sequence) thus I would like to align these two sequences: between the gapped sequence and the sequence mutations. In order to get a column (for example: "L 123>M") with the original value ("L"), the value of the mutation (for example "M") then the position of the mutation ("123"). I don't know which module in python I could use to do this. Do you have any solutions please?

python

1 answer

I think you want to add a column using pandas (see link below).

Add Column to Pandas Dataframe

It might help if you could provide some sample data.

Log in to answer this question.