Thursday, January 11, 2007

HW 1A Thread

Please put questions regarding HW1A in the comments to this thread. If you sign up for blogger with your leland username it will be easier for me to put a name to your comments. Below are some questions I received by email which I anticipate will be common:


  1. The version of Unix I have is Cygwin. Is that compatible?

    You can probably get through the class with Cygwin. I've used it in the past in a pinch, when I needed to use some Windows specific applications.

    However, if possible, I really do recommend getting accustomed to running Linux on its own. Nothing can really substitute for learning some system administration skills and the architecture of a Unix box. Unix, like C, is one of the few things that you can count on to be useful in computer science even 20 years from now. It's as close to a fundamental as you can get outside of mathematics. Also, the ability to solve your own problems by Googling error messages is an invaluable skill for a researcher. Even if all you get out of the course is a familiarity with Unix, aside from the bioinformatics this is a very valuable skill in its own right; Cygwin won't totally develop these muscles.

  2. What is the procedure for hd partitioning?

    If you have a new hard drive (which is probably the easiest and best way to install Linux) then during the installation procedure you can partition the drive. If you need to shrink your existing Windows partition to make room for Linux, see the following links:

    Shrinking Windows Partitions with Gnome Partition Editor
    Partitioning Overview

17 Comments:

Daniela said...

Hi,

For the Perl programming part of HW 1, in (4)(d)(ii) you talk about the GI numbers. Are these the same as the PID's? if not, then where in the .faa and .ptt files are the GI numbers given?

thanks!

Daniela

January 14, 2007 12:27 PM  
balajis said...

Yes, GI numbers are the same as PIDs.

January 14, 2007 1:27 PM  
balajis said...

tina posted:

I am new at UNIX. I am sorry to post stupid questions here.
1. After I download GNU version of UNIX on my computer (Apple). I open the terminal. Can I just start to use it or I have to type cd /opt/local/bin and work from there.
Or I have to log in to elain.stanford.edu by typing
ssh -l myID elaine.stanford.edu

2. For the bash, emacs configuration on the website, do we need to run those codes on terminal first?

3. For command md binaries in the hw, it shows there is no command md . I think it should be the same as mkdir, then I run alais md='mkdir' first. (from bashrc config file on website)
But, I still don't get it. I think maybe I didn't do somthing right.

Can anyone tell me how to start with?
Thanks

January 15, 2007 1:01 PM  
balajis said...

Hi tina,

Don't worry about posting these questions -- it's frequently the case that other people have the same problems.

1) In order to use the GNU versions of the unix utilities, you will need to symbolically link them within that directory and then change your $PATH variable. I updated the HW with more information on how to accomplish this step. See page 2:

http://jinome.stanford.edu/stat366/pdfs/hw1a.pdf

2) In order to learn Unix, you will need to login to elaine.stanford.edu and then type "learn" as outlined in the HW. This is separate from enabling GNU Unix commands on your Mac.

3) Ah, I forgot that not everyone will use my .bashrc file. I changed the HW to use "mkdir" rather than "md" as not everyone has the "md" alias set up.

January 15, 2007 1:09 PM  
Katrin said...

Hi,

I also have two UNIX-ignorant questions:

1. for 3-b-vi, the command

file * | grep data | cut -f1 -d':' | xargs mv -target-directory=binaries/

gives me the following reply:

mv: accessing `arget-directory=binaries/': No such file or directory

why is -t from -target acting as a flag? (or seemingly so)

2. for 3-d-iii: how do I copy the .screenrc file to my home directory? Should I create a .screenrc file and copy-paste the contents?

Thanks!

Katrin

January 15, 2007 1:31 PM  
balajis said...

Katrin:

1) It should be a double dash in front of the "t". I think this and the tilde symbols ("~") did not print in the version I handed out in class; the updated HW1a which I posted on Thursday morning fixed this.

2) You could do that, or you could run

wget http://jinome.stanford.edu/stat366/unix/.screenrc

in your home directory, and then edit it with emacs.

January 15, 2007 1:36 PM  
Katrin said...

Hi,

I have another question reg. 3.b.vi. When I get to the commands "head *ptt", "head *rnt", I do not have any files in my directory that match *ptt and *rnt. I have:

elaine3:~/Escherichia_coli_K12> ls
NC_000913.GeneMark-2.5d NC_000913.asn NC_000913.ffn NC_000913.gbk
NC_000913.GeneMarkHMM-2.6g NC_000913.cog NC_000913.fna binaries
NC_000913.Glimmer3 NC_000913.faa NC_000913.frn

Do you know where I made the mistake?

Thanks!

Katrin

January 15, 2007 2:46 PM  
balajis said...

Hi Katrin:

You probably don't have enough space on elaine to hold the files. The .gbk file alone is 12MB and it appears your transfer terminated before it downloaded.

January 15, 2007 2:51 PM  
balajis said...

FYI, this is the full list:

NC_000913.GeneMark-2.5d
NC_000913.GeneMarkHMM-2.6g
NC_000913.Glimmer3
NC_000913.asn
NC_000913.cog
NC_000913.faa
NC_000913.faa.oneline
NC_000913.ffn
NC_000913.fna
NC_000913.frn
NC_000913.gbk
NC_000913.gene2
NC_000913.gff
NC_000913.ptt
NC_000913.rnt
NC_000913.rps
NC_000913.rpt


You can also see it here:

ftp://ftp.ncbi.nih.gov/genomes/Bacteria/Escherichia_coli_K12

January 15, 2007 2:52 PM  
balajis said...

tina posted:

Hi Balajis [FYI, my name is "Balaji" and my username is "balajis" :)],
When I type ls gnu*, it says "No cush file or
directorys"

The below is the command on the Terminal-bash

Last login: Mon Jan 15 14:08:08 on ttyp1
Welcome to Darwin!
tina1:~ tzutingkuo$ cd /opt/local/bin
tina1:/opt/local/bin tzutingkuo$ ls gnu*
ls: gnu*: No such file or directory
tina1:/opt/local/bin tzutingkuo$

Is there something wrong with the DarwinPorts downloading?

Thanks

January 15, 2007 7:44 PM  
balajis said...

tina posted:

Hi Balaji,

On the page 7 of hw1A, after I do Alt+x, the cusor doesn't appear in the lower left corner of window, do you know what might go wrong?

thanks

January 15, 2007 7:44 PM  
balajis said...

tina:

1) You need to install the right darwinports. For example, did you install GNU's find? If not then you won't get any files which start with GNU in that directory. Look at the list of ports listed on the webpage:

http://jinome.stanford.edu/stat366/unix/balajis_darwinports_installed.txt

2) You need to figure out which key is the "Meta" key and set it appropriately. See here:

http://www.eecs.wsu.edu/~schneidj/mac-os-x-10.3.html#termKeys

http://www.eecs.wsu.edu/~schneidj/mac-os-x-10.3.html

January 15, 2007 7:47 PM  
tina said...

Hi,

About downloading the port, may I just type
sudo port install apr if I want to download apr?

tina1:/opt/local/bin tzutingkuo$ sudo port install apr

Thanks

tina

January 15, 2007 9:51 PM  
balajis said...

tina:

yes.

January 16, 2007 8:13 PM  
Katrin said...

Hi Balaji,

when I type the command (3-b-vi)

dn800c1409:~/Escherichia_coli_K12 katrincox$ file * | grep data | cut -f1 -d':' | xargs mv --target-directory=binaries/

I get:

mv: illegal option -- -
usage: mv [-f | -i | -n] [-v] source target
mv [-f | -i | -n] [-v] source ... directory

Is this because I have yet to install the port that will do this? (I am in the process of installing the ports -- it's taking a very very long time to "fetch" the ports. could the server be down?)

If I do need to install another port, which one would it be so I can skip the others in the meantime.

Thanks

Katrin

January 16, 2007 10:42 PM  
Katrin said...

Ok so I figured out the mv problem -- I hadn't linked it to gmv.

So this may be another stupid question, but where is the .bashrc file? I can't find it... do I have to create it somewhere?

Thanks!

Katrin

January 16, 2007 10:56 PM  
balajis said...

hi katrin,

.bashrc is on the class webpage

January 17, 2007 9:04 PM  

Post a Comment

<< Home