Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Filtering Your Data

To run filter-reads, you must first copy the filter_reads_template.yml file from eidolon/template_config/ to a directory of your choosing. Then you can edit the file in your favorite editor. The configuration has four fields:

bed_file: /path/to/my.bed # required

A filename (full path is best) for a bed file with regions to target for filtering. It should be tab-separated in standard bed format.

In configuration:

files_to_filter: [
  # required, in list form
]

Filenames (full path is best) for files to filter by the bed file. For example, if you ran paired-ended fastqs with the vcf, your list would look like:

files_to_filter: [
   /my/home/output/bacteria_r1.fastq.gz,
   /my/home/output/bacteria_r2.fastq.gz,
   /my/home/output/bacteria.vcf.gz,
]

Each file must end in .fastq, .fastq.gz, .vcf or .vcf.gz; any other extension is refused. Gzipped and unzipped files are both read.

filter_key: .

This is the key appended to the filename, before extensions. For example, if your filename is “miscanthus_r1.fastq.gz”, and you set the key as “_only_genes”, the output file would be “miscanthus_r1_only_genes.fastq.gz”. The default is “_filter”. Output is always gzip-compressed and written next to its input, so an unzipped input gains .gz: “miscanthus_r1.fastq” becomes “miscanthus_r1_only_genes.fastq.gz”.

overwrite_output: false # optional, default false

Set to true to allow filter-reads to overwrite existing output files. When false, the run will error if the output file already exists.

Once your files are entered and your config is saved, you can run eidolon:

$ eidolon filter-reads -c my_config.yml

Your output will give you the filenames and success status.

IMPORTANT: This feature only works on fastq files generated by eidolon. It is untested on generic VCF files, but should work. The reason it only works with eidolon-generated fastq files is that eidolon uses a naming scheme that the parser can use to identify where the read is located (enabling filtering), whereas an average fastq will not have that info.