---
# System prepended metadata

title: Lab 1 Notes

---

# Lab 1 Notes

### **Exercise 1**

Your working directory, or where you do most of your coursework, is within the Unix Environment.

>To connect to the BI278 Unix Environment, connect using the following command- *ssh rakapa25@bi278*

You can view the nested directories within the Unix Environment in various ways.

>You can use the following-
> - *ls
> - ls /home/colbyid
> - ls .*
> 
>And ~ signifies your location, which is /home/colbyid in this case
>Also, to exit BI278, simply type *exit*

You can access more information within each of these directories by using the following command.

>*ls -lh*

In order to navigate to your colbyhome or Personal Directory, type in the following command.

>*ls home*

The Colbyhome page can also be accessed by typing in the following.

>*smb://filer.colby.edu*

In order to actually navigate into the various directories, you have to use the following command. 

>*cd* and then make it *cd colbyhome* to enter your personal directory

Enter the various directories directly by typing in the path.

>* cd/personal/rakapa25

In order to find out which directory you're in, use the following command.

>- *pwd* (print working directory)

Try to name your files in one of the following ways, because Unix doesn't like spaces.

>- my_documents
>- my.documents
>- myDocuments

In order to create and edit new directories, you can use the following commands, as taken from the lab exercise sheet given to us in class.

>*mkdir name*- make a directory named whatever you list after this command
>
>*rmdir name*- remove a specific directory, only works if it’s empty; must use *rm –r* if the directory is not empty
>
>*cp a b*- This command copies file a to b; can be used to not only change location but also filename at same time)
>
>*mv a b*- move a file from a to b; both a and b must be specified; also used for renaming files
>
>*rm*- rm whatever you list after it; cannot be reversed
>
>*cat*- concatenate, or print to screen the entire contents of a file as long as it is a text file
>
>*less filename*- This display the contents of a file one screen length at a time; use arrows to scroll up or down one line at a time; exit by typing q
>
>*head filename*- This commands print to the screen print to screen the top 10 lines of a file)
>
>*tail filename*- This commands print to the screen the bottom 10 lines of a file.
>


There are some commands that help navigating within the directories themselves. 
>- (.) this will navigate to your current	location
>- (..) this will navigate to one	directory	above your current location
>- (~) home,	this	will	take	you	to	wherever	folder	you	started	when	you	connected	to	BI278
> - (*) this is a	"wildcard"	that	will	match	any	string	of	characters	(A-z;	0-9;	etc) and then you can change or move these files.
> 
> *man command*- This allows us to access a manual for most Unix commands. 
>
>*command --help* -This is a command that helps us learn about the properties of specific commands. 



### **Exercise 2**

Individual	chromosomes/	contigs	or	genes	are	labeled	in	a	FASTA file by	the	symbol:	>
The following functions help parse these files. 

> *grep pattern **filename*** -Find	a	specific	pattern	within	a	file
>
> *wc **filename*** -Count	the	words	in	a	file;	can	be	used	to	count	lines	(-l)	or	characters	(-c)	in	a	file
> 
>*tr*- Translate	or	delete	sets	of	characters

> - *Nano*- A command to open up an editor within the Unix shell
> - *Ctrl + X*- A command to close the editor
> - *#!/bin/bash*- A command to indicate that its a bash shell script
> - *sh your_script.sh fasta_filename*- This runs the commands in your bash shell script on the file



|Organism|Strain|Contig count| Genome size(bp)|GC%|
| -------- | -------- | ------------ | --- | --- |
|P.agricolaris|baqs159|2 Whole Genome Shotgun Sequence |8721420 | 61.63%
P.bonniea |bbqs859|2 Whole Genome Shotgun Sequence | 4098182 | 58.72%|
P.	bonniea |bbqs395 | 2 |4009285 |58.80% |
P.	bonniea |bbqs433 |2 |4013203 | 58.78%|
P.	fungorum |ATCC |3 |9058983 |61.75% |
P.	hayleyella| bhqs11| 2|4125700 |59.24% |
P.	hayleyella | bhqs21 |35 |4088512 |59.22%|
P.	hayleyella | bhqs155| 2|4118676 |59.24% |
P.	hayleyella | bhqs171| 35 |4088457 | 59.22%|
P.	hayleyella |bhqs69 |2 |4125852 |59.24% |
P.	hayleyella |bhqs22 |45 |4084312 |59.22% |
P.	hayleyella | bhqs23| 36 |4090401 |59.22% |
P.	hayleyella | bhqs530| 2 |4118722 |58.79% |
P.	sprentiae | WSM5005| 5 |4948909 |63.21% |
P.	terrae |DSM 17804 | 4 |6230535 | 61.92%|
P.	xenovorans  | LB400 | 3 |9702951  | 62.63% |
