Skip to content

Latest commit

 

History

History
115 lines (108 loc) · 11.7 KB

README.org

File metadata and controls

115 lines (108 loc) · 11.7 KB

A simple demo screencast

demo.gif

Installation

seqel requires Emacs version >= 26.

  • Download and package install
    1. Clone the packages with git clone https://github.com/RNAer/seqel.git
    2. Open Emacs run M-x package-install-file, and then input the cloned package directory.
  • Or add to load-path
    (add-to-list 'load-path "~/git/seqel")
    (require 'seqel)
        
  • For latest Emacs, it can also be installed with use-package:
    (use-package seqel
      :vc (:url https://github.com/RNAer/seqel.git))
        

Usage

modes

There are 2 emacs major modes for sequence file formats:

  1. seqel-fasta-mode: fasta file
  2. seqel-genbank-mode: genbank file

Besides major mode, seqel implements 2 minor modes for DNA/RNA (seqel-nuc-mode) and protein (seqel-pro-mode) sequences, respectively.

For both major modes, seqel will automatically determine whether it is nucleotide or protein sequences and turn on the corresponding minor mode.

major functionalities

emacs commandkey bindingfunctionalityin what mode
seqel-fasta-modeenable fasta mode
seqel-fasta-formatformat the current sequence into rows of the same widthfasta-mode
seqel-fasta-format-allformat all the sequences into the same widthfasta-mode
seqel-fasta-countC-c C-ccount the number of fasta sequences in the filefasta-mode
seqel-fasta-deleteC-c C-ddelete the current fasta sequencefasta-mode
seqel-fasta-firstC-c C-amove the cursor to the 1st fasta sequencefasta-mode
seqel-fasta-lastC-c C-zmove the cursor to the last fasta sequencefasta-mode
seqel-fasta-forwardC-c C-f or M-}move the cursor forwards by N fasta sequence(s)1fasta-mode
seqel-fasta-backwardC-c C-b or M-{move the cursor backwards by N fasta sequence(s)1fasta-mode
seqel-fasta-markC-c C-m or M-hselect the current fasta sequencefasta-mode
seqel-fasta-lengthC-c C-lcompute the sequence length of the current fasta sequencefasta-mode
seqel-fasta-positionC-c C-preturn current residue position (skip white spaces and alignment gaps)fasta-mode
seqel-fasta-weightC-c C-wreturn the molecular weight of current sequence (for protein)fasta-mode
seqel-fasta-rcreverse complement the current fasta sequence (for DNA/RNA)fasta-mode
seqel-seqel-fasta-rc-allC-c C-rreverse complement all the fasta sequences in the file (for DNA/RNA)fasta-mode
seqel-fasta-translatetranslate the current DNA/RNA sequence to protein sequencefasta-mode
seqel-fasta-translate-allC-c C-ttranslate all the DNA/RNA sequence to protein sequencefasta-mode
seqel-fasta-paintcolor the current fasta sequence with colors according to residuesfasta-mode
seqel-fasta-paint-allcolor all the fasta sequences with colors according to residuesfasta-mode
seqel-fasta-unpaintuncolor the current fasta sequencefasta-mode
seqel-fasta-unpaint-alluncolor all the fasta sequencesfasta-mode
seqel-fasta-column-highlightC-c C-v hhighlight current column in all sequencesfasta-mode
seqel-fasta-column-paintC-c C-v pcolor the current column with colors according to residuesfasta-mode
seqel-fasta-column-summaryC-c C-v sreturn the residue frequencies of the current columnfasta-mode
seqel-fasta-column-insertC-c C-v iinsert a column in all sequencesfasta-mode
seqel-fasta-column-deleteC-c C-v ddelete current column in all sequences (useful in aligned fasta files)fasta-mode
seqel-genbank-modeenable genbank mode
seqel-genbank-2-fastaconvert current genbank record to fasta formatgenbank-mode
seqel-genbank-2-fasta-allconvert all the genbank records in the file to fasta formatgenbank-mode
seqel-genbank-countC-c C-ccount the number of genbank records in the filegenbank-mode
seqel-genbank-deleteC-c C-ddelete the current genbank recordgenbank-mode
seqel-genbank-firstC-c C-amove the cursor to the 1st genbank recordgenbank-mode
seqel-genbank-lastC-c C-zmove the cursor to the last genbank recordgenbank-mode
seqel-genbank-forwardC-c C-f or M-}move the cursor forwards by N genbank record(s)1genbank-mode
seqel-genbank-backwardC-c C-b or M-{move the cursor backwards by N genbank record(s)1genbank-mode
seqel-genbank-markC-c C-m or M-hselect and highlight the current genbank recordgenbank-mode
seqel-genbank-lengthC-c C-lcompute the sequence length of the current genbank recordgenbank-mode
seqel-nuc-modeenable or disable nucleotide minor mode
seqel-nuc-move-forwardC-c C-n C-fmove the cursor forwards by N nucleotide(s)1nuc-mode
seqel-nuc-move-backwardC-c C-n C-bmove the cursor backwards by N nucleotide(s)1nuc-mode
seqel-nuc-delete-forwarddelete N nucleotide(s) forwards1nuc-mode
seqel-nuc-delete-backwarddelete N nucleotide(s) backwards1nuc-mode
seqel-nuc-countcount the number of nucleotides in the current sequencenuc-mode
seqel-nuc-summarycompute and show the frequencies of all bases in the sequencenuc-mode
seqel-nuc-paintcolor the sequence by its nucleotide basesnuc-mode
seqel-nuc-unpaintundo the coloringnuc-mode
seqel-nuc-complementcomplement the nucleotide sequencenuc-mode
seqel-nuc-rcC-c C-n C-rreverse complement the nucleotide sequencenuc-mode
seqel-nuc-2rnaconvert the sequence to RNAnuc-mode
seqel-nuc-2dnaconvert the sequence to DNAnuc-mode
seqel-nuc-whrcompute the weighted homopolymer rate of the sequencenuc-mode
seqel-nuc-set-translate-tableset the translation table. Default is to use table 1.nuc-mode
seqel-nuc-translateC-c C-n C-ttranslate the sequence into proteinnuc-mode
seqel-nuc-rna-pcheck if the sequence is RNA or notnuc-mode
seqel-nuc-dna-pcheck if the sequence is DNA or notnuc-mode
seqel-pro-modeenable or disable protein minor mode
seqel-pro-move-forwardC-c C-p C-fmove the cursor forwards by N amino acid(s)1pro-mode
seqel-pro-move-backwardC-c C-p C-bmove the cursor backwards by N amino acid(s)1pro-mode
seqel-pro-delete-forwarddelete N amino acid(s) forwards1pro-mode
seqel-pro-delete-backwarddelete N amino acid(s) backwards1pro-mode
seqel-pro-countcount the number of amino acids in the sequencepro-mode
seqel-pro-summarycompute and show the frequencies of all amino acids in the sequencepro-mode
seqel-pro-paintcolor the sequence by its amino acidspro-mode
seqel-pro-unpaintundo the coloringpro-mode
seqel-pro-weightC-c C-p C-wcompute molecular weight of the protein sequencepro-mode
seqel-pro-1-2-3covnert 1-letter IUPAC code to 3-letter IUPAC code for the protein sequencepro-mode
seqel-pro-3-2-1convert 3-letter to 1-letter codepro-mode

footnote1: default N is one; you can combine with C-u to set N to other values

search for sequence pattern/motif

  • You can search a sequence motif using C-s (isearch-forward).
  • By default, IPUAC degeneracy codes is supported and whitespaces, gaps, and other irrelevant characters in the middle of a matching hit are ignored. Users can disable this behavior and return back to conventional isearch by M-x seqel-toggle-isearch.

For developers

unit tests

The package is unit tested using ert module of Emacs. You can run all the unit tests with linux command:

make test  # use the default emacs installed on your OS
make test EMACS=/usr/local/Cellar/emacs-plus@30/30.0.60/Emacs.app/Contents/MacOS/Emacs  # or you can use another emacs installed at other places.