Applied Genomics Coding

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/63

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 7:42 AM on 9/10/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

64 Terms

1
New cards

mkdir DirName

Make a new directory

2
New cards

cd DirName

Change directory to the DirName directory that is within the current folder

3
New cards

cd ~

Return to login directory

4
New cards

cd ..

Change directory to the next one above this one

5
New cards

pwd

Show the path for the directory that I’m in now

6
New cards

ls

Show the files in the current directory

7
New cards

cp

Copy a file (e.g. cp oldname.txt newname.txt

8
New cards

cat

Show the contents of a file (e.g. cat filename.txt)

9
New cards

rm

Delete (e.g. rm filename.txt)

10
New cards

mv

Rename a file (e.g. oldname.txt newname.txt)

11
New cards

head

Show the first 10 lines of a file (ex. head - x = first x lines)

12
New cards

tail

Show the last 10 lines of a file

13
New cards

grep

Search inside the files for an item (e.g. grep blue *.txt or for the number 5: grep -n 5 file name)

14
New cards

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)

15
New cards

man commandname

Prints out the entry from the user manual for that command

16
New cards

nedit

Open a text editor in a new window

17
New cards

xterm

Spawn a new command window

18
New cards

Get back to directory

cd directory name/

19
New cards

ls -lh file name

Gives the size of a file

20
New cards

wc -l file name

Gives the number of lines in the file

21
New cards

head -n file name > new file name

Captures the first n lines of a file

22
New cards

cp /shared/files/file name .

copy files to the home directory

23
New cards

gz file name

unzips a file (gz files are zipped)

24
New cards

bwa index file name

Ensure a file is used efficiently by BWA

25
New cards

.sam file

reports the read sequence, the read quality, and where it maps to on the genome

26
New cards

Sam format vs Bam format

Sam format = human readable whereas bam format = machine readable

27
New cards

navigating tview

  • Hit letter g and then enter =position and it will take you to that position

  • Y = heterozygous


28
New cards

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


29
New cards

.vcf file

The first few lines will inform you on how to read the outputs

30
New cards

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

31
New cards

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


32
New cards

pink --file file name --freq --out file name

Allele frequencies for .ped and .map files

33
New cards

plink --file file name --het --out file name

--het command computes observed and expected homozygous genotype counts for each sample and reports F coefficients

34
New cards

plink --bfile test --genome --cluster --out test

  • --genome → calculate pairwise IBD/relatedness between individuals

  • --cluster → perform clustering based on the genetic relationships


35
New cards

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.

36
New cards
37
New cards
38
New cards
39
New cards
40
New cards
41
New cards
42
New cards
43
New cards
44
New cards
45
New cards
46
New cards
47
New cards
48
New cards
49
New cards
50
New cards
51
New cards
52
New cards
53
New cards
54
New cards
55
New cards
56
New cards
57
New cards
58
New cards
59
New cards
60
New cards
61
New cards
62
New cards
63
New cards
64
New cards