Part 1: FASTA Imports
The FASTA file was stored as a list to show the different types of
information in separate element.
The list has 1 sequence.
The data is stored in the binary/raw format which keeps the data in
bytes versus regular text.
FASTA <- read.FASTA("~/Desktop/BIN521L/Unit1-KG/MT103168.fasta")
head(FASTA)
## 1 DNA sequence in binary format stored in a list.
##
## Sequence length: 1560
##
## Label:
## MT103168.1 Bifidobacterium longum strain BB536 cell division...
##
## Base composition:
## a c g t
## 0.156 0.319 0.289 0.236
## (Total: 1.56 kb)
str(FASTA)
## List of 1
## $ MT103168.1 Bifidobacterium longum strain BB536 cell division protein FtsW (rodA) gene, complete cds: raw [1:1560] 88 18 48 88 ...
## - attr(*, "class")= chr "DNAbin"
Part 2: FastQ Imports
The FASTQ file was stored as a list similar to above, because FASTQ
files contain different pieces of information based on the
sequencing.
This file has 3 elements.
The VCF file was stored as a data frame so the information is
organized into rows and columns. Each row represents a variant, and each
column contains different information about each variant.
A data frame contains multiple data types in different columns.
VCF <- read.table('~/Desktop/BIN521L/Unit1-KG/TwoVariants.vcf')
mylines <- read.csv('~/Desktop/BIN521L/Unit1-KG/TwoVariants.vcf',sep = "\n")
names(VCF)
## [1] "V1" "V2" "V3" "V4" "V5" "V6" "V7" "V8" "V9" "V10"
head(VCF)
## V1 V2 V3 V4 V5 V6 V7 V8 V9
## 1 NZ_BCYL01000006.1 29 . A G . . AC=84;AF=1.0;SB=0.0 GT:AC:AF:SB:NC
## 2 NZ_BCYL01000006.1 145 . A G . . AC=114;AF=1.0;SB=0.0 GT:AC:AF:SB:NC
## V10
## 1 1:84:1.0:0.0:+G=37,-G=47,
## 2 1:114:1.0:0.0:+G=42,-G=72,
str(VCF)
## 'data.frame': 2 obs. of 10 variables:
## $ V1 : chr "NZ_BCYL01000006.1" "NZ_BCYL01000006.1"
## $ V2 : int 29 145
## $ V3 : chr "." "."
## $ V4 : chr "A" "A"
## $ V5 : chr "G" "G"
## $ V6 : chr "." "."
## $ V7 : chr "." "."
## $ V8 : chr "AC=84;AF=1.0;SB=0.0" "AC=114;AF=1.0;SB=0.0"
## $ V9 : chr "GT:AC:AF:SB:NC" "GT:AC:AF:SB:NC"
## $ V10: chr "1:84:1.0:0.0:+G=37,-G=47," "1:114:1.0:0.0:+G=42,-G=72,"