---
# System prepended metadata

title: Lab week 1

---

# Lab week 1
# **
To login `ssh slpuro26@bi278` enter password
Permanently added Bi278 to list of known hosts
Exited and logged back in

`ls` colby.cshrc  colby.login  colby.logout  colby.profile
`ls -lh` -rw-------. 1 slpuro26 50817 0 Sep 13 13:16 colby.cshrc
-rw-------. 1 slpuro26 50817 0 Sep 13 13:16 colby.login
-rw-------. 1 slpuro26 50817 0 Sep 13 13:16 colby.logout
-rw-------. 1 slpuro26 50817 0 Sep 13 13:16 colby.profile

Colby home did not work
`.` = here

Then attempted to make a copy of the files in bi278

Originally I made the files in personal and not home so I had to move the files

 `mv /personal/slpuro26/lab_01a .`
`mv /personal/slpuro26/lab_01b .`
ls /personal/slpuro26/ to check i did it

`pwd` - show position (print working directory)
`ls` - list of options
`ls /courses/bi278` = courses
`colbyhome` and `/personal/slpuro26` are same
`cd` change diretcory (transports)
`cd /personal/slpuro26` change directories in colby home
`ls /courses/bi278/Course_Materials/lab_01a` opens files in bi278


When naming files remove spaces with \  or use _, ., aA

`~` home
`cd /personal/slpuro26` home
`mkdir` make directory
`cp /courses/bi278/Course_Materials/lab_01a/* ./lab_01a` copy lab_01a directory
`ls lab_01a lab_01b` entered the new directory with all of the copied documents
use up and down arrows to see most recent commands 
`history` every command in recent history
Always check spelling because missspellings ad missing letters will not run command 
`ls /courses/bi278/Course_Materials/lab_01b/GCF` Autocomplete showed all files 
man `command` shows options for command
commands 
`mkdir name` make a directory
`rmdir name` remove specific directory when empty
`cp a b` copy file a to b to not only change location and name file
`mv a b` move a file from a to b when specified and can also rename
`rm` remove, cannot be reversed
`cat` print to screen the content of a file
`less filename` displays the contents of a file one screen length at a time and can scroll suing up and down arrows 
 `head` and `tail` prints top and bottom ten lines 
`man command` manual unix commands 
`ls /courses/bi278/Course_Materials/ lab_01b/` opened for exercise 2


> sends the results of the command that preceded it to a file that you specify after it so it will write over that file if it already exists; so use quotes ">" if you want to use > as a pattern:
 
 run `grep ">" /courses/bi278/Course_Materials/lab_01b/filename` to see what sequences are included in the genome, the first exmaple includes three chromosomes
 *P.agricolaris* strain **baqs159** contig count **2**
  *P. bonniea* strain **bbqs859** contig count **2**
  *P. bonniea* strain **bbqs395** contig count **2** 
  *P. bonniea* strain **bbqs433** contig count **2**
  *P. fungorum* strain **ATCC BAA-463** contig count **4**
  *P. hayleyella* strain **bhqs11** contig count **2** 
  *P. hayleyela* strain **bhqs155** contig count **2**
  *P. hayleyella* strain **bhqs171** contig count **35** 
  *P. hayleyella* strain **bhqs21** contig count **35**
  *P. hayleyella* strain **bhqs22** contig count **45** 
  *P. hayleyella* strain **bhqs23** contig count **36**
  *P.hayleyella* strain **bhqs530** contig count **2** 
  *P. hayleyella* strain **bhqs69** contig count **2**
  *P. sprentiae* strain **WSM5005** contig count **5** 
  *P. terrae* strain **DSM 17804** contig count **4**
  *P. xenovorans* strain **LB400** contig count **3**
  
  next opened test.fa to try and answer size of the genome
  
  `grep -v ">" PATH/test.fa` gives the inverse of "V" (the NA sequence) 
  `grep -v "V" PATH/test.fa | tr -d -c GCgc` gives just the Gs and Cs and adding `| wc -c` counts them
  then, `GCATgcat` instead of `GCgc` withe GCgc count / GCATgcat count 
  `awk 'BEGIN {print (253/400)} `does the divison`
  `nano` opens up the editor, controlX closes the window
  made nano script using firstbthree grep commands and the saved it 