1/63
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
mkdir DirName
Make a new directory
cd DirName
Change directory to the DirName directory that is within the current folder
cd ~
Return to login directory
cd ..
Change directory to the next one above this one
pwd
Show the path for the directory that Iām in now
ls
Show the files in the current directory
cp
Copy a file (e.g. cp oldname.txt newname.txt
cat
Show the contents of a file (e.g. cat filename.txt)
rm
Delete (e.g. rm filename.txt)
mv
Rename a file (e.g. oldname.txt newname.txt)
head
Show the first 10 lines of a file (ex. head - x = first x lines)
tail
Show the last 10 lines of a file
grep
Search inside the files for an item (e.g. grep blue *.txt or for the number 5: grep -n 5 file name)
sort
Sort a file on a column number (-k N for column N, -g for number sort) (e.g. sort -g -k 1 file name)
man commandname
Prints out the entry from the user manual for that command
nedit
Open a text editor in a new window
xterm
Spawn a new command window
Get back to directory
cd directory name/
ls -lh file name
Gives the size of a file
wc -l file name
Gives the number of lines in the file
head -n file name > new file name
Captures the first n lines of a file
cp /shared/files/file name .
copy files to the home directory
gz file name
unzips a file (gz files are zipped)
bwa index file name
Ensure a file is used efficiently by BWA
.sam file
reports the read sequence, the read quality, and where it maps to on the genome
Sam format vs Bam format
Sam format = human readable whereas bam format = machine readable
navigating tview
Hit letter g and then enter =position and it will take you to that position
Y = heterozygous
Identifying a file needs to be indexed
If asked to sort a file and then given this command: samtools tview ERR495003-pe-sorted.bam GCF_000195835.2_ASM19583v2_genomic.fna
You would need to identify that the file needs to be sorted and sort it by indexing it - samtools index ERR495003-pe-sorted.bam
.vcf file
The first few lines will inform you on how to read the outputs
Capture the numbers from the second column of a file for the last 3096 columns (to cut out the header)
gawk ā{print $2}ā ERR495003.vcf | tail -n 3096 > ERR495003.pos
PLINK
Two basic file types in PLINK
.ped
.map = tell you where things are
Sex is typically coded as 1 (male), 2 (female), or 0 (unknown)
Phenotypes are typically coded for case-control analyses as 2 (affected), 1 (unaffected), or -9 (unknown)
Genotypes can be coded in a range of ways, but typically alleles are coded as paired combinations of A, C, G, T, or 0
pink --file file name --freq --out file name
Allele frequencies for .ped and .map files
plink --file file name --het --out file name
--het command computes observed and expected homozygous genotype counts for each sample and reports F coefficients
plink --bfile test --genome --cluster --out test
--genome ā calculate pairwise IBD/relatedness between individuals
--cluster ā perform clustering based on the genetic relationships
cat Test.genome | grep Fam1..64 | grep 0.5 | wc -l
This command is essentially counting how many rows in Test.genome match individual 64 and have a value of 0.5 somewhere in the row.