Skip to content
Martin Asser Hansen edited this page Oct 2, 2015 · 6 revisions

Biopiece: scores_to_dec

Description

scores_to_dec converts ASCII encoded quality scores to decimal values depending on a specifed ASCII base value. The SCORES are encoded as ranges of ASCII characters from '!' to 'I' for base 33 or from '@' to 'h' for base 64, both ranges indicating scores from 0 to 40. The semi-colon seperated decimal values are used to substitute the value to SCORES.

Read more here:

http://en.wikipedia.org/wiki/FASTQ_format

Usage

... | scores_to_dec [options]

Options

[-?         | --help]               #  Print full usage description.
[-I <file!> | --stream_in=<file!>]  #  Read input stream from file                     -  Default=STDIN
[-O <file>  | --stream_out=<file>]  #  Write output stream to file                     -  Default=STDOUT
[-v         | --verbose]            #  Verbose output.

Examples

Consider the following FASTQ entry in the file test.fq:

@HWI-EAS157_20FFGAAXX:2:1:888:434
TTGGTCGCTCGCTCCGCGACCTCAGATCAGACGTGGGCGAT
+HWI-EAS157_20FFGAAXX:2:1:888:434
@ABCDEFGHIJKLMNOPQRSTUVWhgfedcba`_^]\[ZYX

We can read in these sequence using read_fastq and then soft mask the sequence with scores_to_dec like this:

read_fastq -i test.fq | scores_to_dec

SCORES: 0;1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16;17;18;19;20;21;22;23;40;39;38;37;36;35;34;33;32;31;30;29;28;27;26;25;24
SEQ: TTGGTCGCTCGCTCCGCGACCTCAGATCAGACGTGGGCGAT
SEQ_LEN: 41
SEQ_NAME: HWI-EAS157_20FFGAAXX:2:1:888:434
---

See also

read_fastq

mask_seq

Author

Martin Asser Hansen - Copyright (C) - All rights reserved.

mail@maasha.dk

August 2010

License

GNU General Public License version 2

http://www.gnu.org/copyleft/gpl.html

Help

scores_to_dec is part of the Biopieces framework.

http://www.biopieces.org

Clone this wiki locally