assign3.htmlassign3.html UNIX Assignment #2: Editing text with emacs

UNIX Assignment #2: Editing text with emacs

This is Assignment should take 1-2 hours of steady work. Use the lecture notes Web pages as a reference.

1. Login to your account on genetraffic.med.nyu.edu, move to your sub-directory for classwork and get a directory listing. You should have some sequence files from last week.

***Here is something new, set up your account on the "genetraffic" server to access databases over the internet*** Copy this file to a text file in your home directory and name it .embossrc
- use emacs, open a new document, paste in the text and save

2. Now get a sequence file from GenBank:

 seqret GENBANK:CAG46711 

Now open this sequence file in emacs:
> emacs cag46711.fasta

3. Try out the navigation commands, use the arrow keys to move one character or one line at a time;
Ctrl-V
to page down and [Esc] V to page up; [Esc] > and [Esc] < to jump to the end and the beginning of the file.

4. Now move to a line somewhere in the annotation and start typing. Then go back and delete what you have typed.

5. Now try the copy and paste commands to move a block of text.

Move your cursor to the beginning of the text that you want to move and set a "Mark" with
[Ctrl-spacebar]

Now move the cursor to the end of the block of text and "Cut" it to the clipboard with [Ctrl-W]

Move to the place where you want to put the text and "Paste" it in with [Ctrl-Y]

6. Save and exit from emacs: [Ctrl-X] [Ctrl-C] and answer "yes" when it asks if you want to save
We will get back to emacs at the end of this lesson.

Copy this sequence into a text file (use emacs)
GCTCGAATA CCCTCCTAAA GGGACTAGTC CTGCAGGGTT TAAACGAATT 
CGCCCTTAAG CAGCGGTATC AACGCAGAGn ACTTTATTTT TTTTTTTTTT 
TTTnATTGAG TTTCACTTnT CGnGGnGATA AATTTTGnAA AATATACGTT 
ATAAATTATA TTAGGGGGTT GCCTTTAATT GAATATCATT GCATTTTTAT 
TATTTATTTT ATGAAGTACT ATTTAAAATA AATAAAAATA nACCTTAGTT 
ATTTATATAA AGnTTAATTA AATACnAGTA AATCCnTACT TCATTTTGnG 
GGGATTAATT CTGnATTTTA TCTTACCTTA TTCTTTATAT ACTTTATTTT 
TATTCTATTG CATTTTAGCT TTTAAATCAA ATTTTATGAT TTTTTATTnG 
TATTTTTTnT ATATTGnTAT TGnCnTTATT ACCAATCATn GATAGCTTG 

Use the EMBOSS seqret command to turn the text into a usable sequence file.

––––––––––––––––––––––––––

15. Now we try a very simple program. First copy this file of DNA sequences from the browser into a new file in your Classwork directory (use emacs again).

testseq.fas

These are some ESTs from a cDNA sequencing project; and we would like to check for redundancy - how many transcripts we might have from the same gene.

16. Unpack the sequences into individual Fasta formatted files using the EMBOSS command

seqretsplit testseq.fas

17. Now we will create a simple loop program to check each sequence against the other ones. Use the shell command foreach like this: