ComenzarEmpieza gratis

Extract a sample from a fastq file

It is your turn to draw a sample piece from a sequence of many reads.

You will use the same file you've read in the previous exercise. This file has 500 reads, each of 50 bp. The file path is stored in an object called f.

Using FastqSampler(con = file_path, n = length), set.seed(), and yield() you can subset 100 reads from your sequence file.

Este ejercicio forma parte del curso

Introduction to Bioconductor in R

Ver curso

Instrucciones del ejercicio

  • Load ShortRead.
  • Use set.seed() with value 1234.
  • Use FastqSampler() with the small fastq file located in f and select 100 reads.
  • Use yield() to generate the sub sequence.

Ejercicio interactivo práctico

Prueba este ejercicio completando el código de muestra.

# Load ShortRead
library(ShortRead)

# Set a seed for sampling
___

# Use FastqSampler with f and select 100 reads
fs <- ___(con = ___, ___ = ___)

# Generate new sample yield
my_sample <- ___

# Print my_sample
___
Editar y ejecutar código