reading_in: Function for parsing the text output of FastQC

Description Usage Arguments Value Examples

View source: R/reading_in.R

Description

This functions extracts the values for a specific test run by FastQC on a single fastq file. Running this function equals to executing this sed command: sed -n '/anytest/,/END_MODULE/p' file | grep -v '^>>'. The -n option disables the automatic printing, and print the lines you explicitly tell it to print (with p) get printed only once. So the sed command here is to print the lines from the title of the test of your intrest to the end of the content of this test. Then grep -v '^>>' is to get rid of the first and the last lines started with >>.

Usage

1
reading_in(file, test = "Per base sequence quality", sample)

Arguments

file

string that specifies the path to an individual FastQC result file (tyically named "fastqc_data.txt"

test

Indicate which test results should be extracted. Default: "Per base sequence quality". Other options are, for example, "Per tile sequence quality", "Per sequence quality score" etc.

sample

a user-specified sample name (e.g. "WT_1_ERR458493") to be added to the output dataframe

Value

data.frame with the values of a single FastQC test result.

Examples

1
2
3
4
## Not run: 
res <- reading_in(file = "acinar-3_S9_L001_R1_001_fastqc/fastqc_data.txt")

## End(Not run)

chilampoon/ohmyR documentation built on March 8, 2021, 12:04 a.m.