auto_process_ngs.qc.apps.fastq_screen

Provides utility classes and functions for handling FastqScreen outputs.

Provides the following classes:

  • Fastqscreen: wrapper for handling outputs from FastqScreen

Provides the following functions:

  • fastq_screen_output_files: generates names of FastScreen outputs files

class auto_process_ngs.qc.apps.fastq_screen.Fastqscreen(screen_file)

Class representing data from a FastqScreen run

property libraries

List of library names used in the screen

property no_hits

Percentage of reads with no hits on any library

property png

Path of the fastq_screen.png file

property txt

Path of the fastq_screen.txt file

property version

Version of fastq_screen which produced the screens

auto_process_ngs.qc.apps.fastq_screen.LEGACY_SCREENS = ('model_organisms', 'other_organisms', 'rRNA')

Example screen file for v0.4.1:

#Fastq_screen version: 0.4.1 Library %Unmapped %One_hit_one_library %Multiple_hits_one_library %One_hit_multiple_libraries %Multiple_hits_multiple_libraries hg19 98.10 0.02 0.27 0.55 1.06 mm9 35.92 47.46 10.18 3.56 2.88 rn4 93.01 0.18 0.17 3.87 2.77 dm3 99.97 0.00 0.00 0.01 0.02 ws200 99.98 0.00 0.00 0.00 0.02 ecoli 96.52 0.43 3.05 0.00 0.00 saccer 99.97 0.00 0.00 0.00 0.03 PhiX 99.33 0.67 0.00 0.00 0.00 Vectors 99.99 0.00 0.00 0.01 0.00 SpR6 100.00 0.00 0.00 0.00 0.00

%Hit_no_libraries: 30.80

Example screen file for v0.4.2:

#Fastq_screen version: 0.4.2 #Reads in subset: 1000000 Library #Reads_processed #Unmapped %Unmapped #One_hit_one_library %One_hit_one_library #Multiple_hits_one_library %Multiple_hits_one_library #One_hit_multiple_libraries %One_hit_multiple_libraries Multiple_hits_multiple_libraries %Multiple_hits_multiple_libraries hg19 89393 89213 99.80 1 0.00 0 0.00 11 0.01 168 0.19 mm9 89393 89157 99.74 11 0.01 5 0.01 2 0.00 218 0.24 rn4 89393 89170 99.75 2 0.00 1 0.00 8 0.01 212 0.24 dm3 89393 89391 100.00 0 0.00 0 0.00 0 0.00 2 0.00 ws200 89393 89391 100.00 0 0.00 0 0.00 1 0.00 1 0.00 ecoli 89393 89393 100.00 0 0.00 0 0.00 0 0.00 0 0.00 saccer 89393 89392 100.00 0 0.00 0 0.00 1 0.00 0 0.00 PhiX 89393 89393 100.00 0 0.00 0 0.00 0 0.00 0 0.00 Vectors 89393 89393 100.00 0 0.00 0 0.00 0 0.00 0 0.00 SpR6 89393 89393 100.00 0 0.00 0 0.00 0 0.00 0 0.00

%Hit_no_libraries: 99.73

auto_process_ngs.qc.apps.fastq_screen.fastq_screen_output_files(fastq, screen_name, legacy=False)

Generate names of fastq_screen output files

Given a Fastq file name and a screen name, the outputs from fastq_screen will look like:

  • {FASTQ}_screen_{SCREEN_NAME}.png

  • {FASTQ}_screen_{SCREEN_NAME}.txt

“Legacy” screen outputs look like:

  • {FASTQ}_{SCREEN_NAME}_screen.png

  • {FASTQ}_{SCREEN_NAME}_screen.txt

Parameters:
  • fastq (str) – name of Fastq file

  • screen_name (str) – name of screen

  • legacy (bool) – if True then use ‘legacy’ (old-style) naming convention (default: False)

Returns:

fastq_screen output names (without leading path)

Return type:

tuple