December 14, 2018

Content of /home/bioinfo

ls /home/bioinfo/
ls /home/bioinfo/human_readable/refseq/bacteria/
    Citrobacter/freundii/
ls /home/bioinfo/human_readable/refseq/bacteria/
less /home/bioinfo/pKEC-a3c.gbk
less /home/bioinfo/pKEC-a3c.fna
less /home/bioinfo/NZ_CP007557.gbk
less /home/bioinfo/NZ_CP007557.fna

Get FASTA for E.coli

zcat /home/bioinfo/human_readable/refseq/bacteria/
    Escherichia/coli/K-12_substr._MG1655/
    GCF_000005845.2_ASM584v2_genomic.fna.gz \
    > /home/bioinfo/NC_000913.fna

Prepare your working folder

mkdir exam
cd exam/
ls -l

Get you own E.coli genome

zcat /home/bioinfo/human_readable/refseq/bacteria/
    Escherichia/coli/K-12_substr._MG1655/
    GCF_000005845.2_ASM584v2_genomic.fna.gz > NC_000913.fna
zcat /home/bioinfo/human_readable/refseq/bacteria/
    Escherichia/coli/UMN026/
    GCF_000026325.1_ASM2632v1_genomic.fna.gz \
        > UMN026.fna
ls -l

Map reads to genome

bwa index NC_000913.fna
bwa mem -R '@RG\tID:foo\tSM:bar\tLB:library1' \
    NC_000913.fna \
    /home/bioinfo/1-F5-96_S1_L001_R1_001.fastq.gz \
    /home/bioinfo/1-F5-96_S1_L001_R2_001.fastq.gz \
     > ecoliK12.sam
ls -l
less ecoliK12.sam

Index plasmid sequence

cp /home/bioinfo/pKEC-a3c.fna .
bwa index pKEC-a3c.fna

Map reads into plasmid

bwa mem -R '@RG\tID:exam\tSM:Terje\tLB:F5' pKEC-a3c.fna \
    /home/bioinfo/1-F5-96_S1_L001_R1_001.fastq.gz \
    /home/bioinfo/1-F5-96_S1_L001_R2_001.fastq.gz  \
    > plasmid.sam
ls -l
wc -l plasmid.sam

Examine result

less plasmid.sam
less -S plasmid.sam
awk '$3=="*" {print $1}' plasmid.sam
less -S plasmid.sam