This question was also asked on StackOverflow
I have a multiple sequence alignment (MSA) file derived from mafft in clustal format which I want to import into Python and save into a PDF file. I need to import the file and then highlight some specific words. I've tried to simply import the pdf of the MSA but after the highlight command doesn't work.
I need to print the file like this:
Multi.txt
:
CLUSTAL format alignment by MAFFT FFT-NS-i (v7.453)
Consensus --------------------------------------acgttttcgatatttatgccat
AMP tttatattttctcctttttatgatggaacaagtctgcgacgttttcgatatttatgccat
**********************
Consensus atgtgcatgttgtaaggttgaaagcaaaaatgaggggaaaaaaaatgaggtttttaataa
AMP atgtgcatgttgtaaggttgaaagcaaaaatgaggggaaaaaaaatgaggtttttaataa
************************************************************
Consensus ctacacatttagaggtctaggaaataaaggagtattaccatggaaatgtatttccctaga
AMP ctacacatttagaggtctaggaaataaaggagtattaccatggaaatgtaattccctaga
************************************************** *********
Consensus tatgaaatattttcgtgcagttacaacatatgtgaatgaatcaaaatatgaaaaattgaa
AMP tatgaaatattttcgtgcagttacaacatatgtgaatgaatcaaaatatgaaaaattgaa
************************************************************
Consensus atataagagatgtaaatatttaaacaaagaaactgtggataatgtaaatgatatgcctaa
AMP atataagagatgtaaatatttaaacaaagaaactgtggataatgtaaatgatatgcctaa
************************************************************
Consensus ttctaaaaaattacaaaatgttgtagttatgggaagaacaaactgggaaagcattccaaa
AMP ttctaaaaaattacaaaatgttgtagttatgggaagaacaaactgggaaagcattccaaa
************************************************************
Consensus aaaatttaaacctttaagcaataggataaatgttatattgtctagaaccttaaaaaaaga
AMP aaaatttaaacctttaagcaataggataaatgttatattgtctagaaccttaaaaaaaga
************************************************************
Consensus agattttgatgaagatgtttatatcattaacaaagttgaagatctaatagttttacttgg
AMP agattttgatgaagatgtttatatcattaacaaagttgaagatctaatagttttacttgg
************************************************************
Consensus gaaattaaattactataaatgttttattataggaggttccgttgtttatcaagaattttt
AMP gaaattaaattactataaatgttttattataggaggttccgttgtttatcaagaattttt
************************************************************
Consensus agaaaagaaattaataaaaaaaatatattttactagaataaatagtacatatgaatgtga
AMP agaaaagaaattaataaaaaaaatatattttactagaataaatagtacatatgaatgtga
************************************************************
Consensus tgtattttttccagaaataaatgaaaatgagtatcaaattatttctgttagcgatgtata
AMP tgtattttttccagaaataaatgaaaatgagtatcaaattatttctgttagcgatgtata
************************************************************
Consensus tactagtaacaatacaacattgga----------------------------------
AMP tactagtaacaatacaacattggattttatcatttataagaaaacgaataataaaatg
************************
How can I import the alignment and print in the new PDF with the right alignment of the sequences.
Thanks