# Notes from Lab
Log in
ssh kkhtut24@bi278
Password
Locate relevant files that we are organizing
cd /courses/bi278/Course_Materials/lab_01a
Go home
cd ~
Make folders to organization
mkdir lab_01a lab_01b
Copy files into relevant directory
cp /courses/bi278/Course_Materials/lab_01a/* ./lab_01a
Enter new folder
Cd ~/lab_01a
Ensure files are copied over
Ls
Create organization folders within using
Mkdir ./foldername
Use
Mv A B (a being initial file, b being target destination)
Repeat for every file until organized
Exercise 2
In order to read genomic files, navigate to directory with genomic files
Cd /courses/bi278/Course_Materials/lab_01b
Then, use grep command to find individual chromosomes/contigs or genes labeled by > in FASTA
grep ">" /courses/bi278/Course_Materials/lab_01b/filename
In order to count the number of base pairs inside of a genomic file, use the wc command with -c
Wc -c ./filename
In order to find the GC percent, use grep to first isolate the GCs of the genome, delete the non GC, then do a wc count, piping the results form one command into the next using |
grep -v ">" ./test.fa | tr -d -c GCgc | wc -c
Tr works by taking set1, defined by GCgc, then deletes the complement of GCgc (-d -c)
Once you have a count of GCs, use awk to calculate the percent of GCs to ATGCs
Awk ‘BEGIN {print (253/400)}’
This process can be repeated for each genomic sample in order to evaluate the GC content of dna sequences.
Commands used:
Cd : change directory, usage is “cd (pathway)” and requires using a complete path file directory
Cp: copy, can copy files form one location to another, usage is “cp (subject filepath) (desired filepath)”
Mkdir: used to make folder directories, usage is mkdir (folder name), makes a folder within current directory
Ls: list, lists items present in current directory or target directories.
Mv: move, used to move files form one location to another, usage is “mv (subject filepath) (desired filepath)”
Grep: used to find a subject pattern, usage is “gp “pattern”(pattern location)”
Wc: word count, used to count characters or words in a text file, comes with various options that can modify command
Man: manual, used to find various options for any command
Tr: translate, used to translate or delete characters, use man to find options for usage.
awk: used to execute any number of different functions and calculations, use man to find options and usage.