seriesoftubes.converters
conversion/discover tools for file formats
most of these can be run as scripts
seriesoftubes.converters.discover
-
seriesoftubes.converters.discover.discover_file_format(filename)[source]
discover the format of a file
returns a tuple (open_function, ‘FORMAT’)
open_function will either be open, gzip.GzipFile, bz2.BZ2File, or None
FORMAT can be ‘BAM’, ‘SAM’, ‘FASTQ’, ‘FASTA’, or None
seriesoftubes.converters.cat
Writes file(s) to stdout, decompress them if needed
supports gzip, bzip2
Output is always to stdout (err goes to stderr, redirect it if you need to)
-
seriesoftubes.converters.cat.main()[source]
what to do if we execute the module as a script
cat
seriesoftubes.converters.anytotab
Convert single-end or paired-end sequencing files to tab-format
NAME SEQ1 QUAL1 (SEQ2 QUAL2)
Supports FASTQ (plaintext, gzip and bz2), SAM, BAM
Output is always to stdout (err goes to stderr, redirect it if you need to)
-
seriesoftubes.converters.anytotab.main()[source]
what to do if we execute the module as a script
seriesoftubes.converters.bamtofastq
Convert BAM/SAM to FASTQ format*
@name
sequence
+name
quality score (phred33)
files may be SAM or BAM (autodetected)
If the file(s) contain paired-end sequences, we will write to two files
(in the current working directory)
If the files contain single end sequences, we will write to stdout by default
Output is always to stdout (err goes to stderr, redirect it if you need to)
-
class seriesoftubes.converters.bamtofastq.UnpairedBAMToFastqConverter(file_, wd=None, stderr=None, logger=None)[source]
Works with unpaired SAM/BAM file
-
seriesoftubes.converters.bamtofastq.main()[source]
what to do if we execute the module as a script
bamtofastq can only convert files (not stdin) because of the paired-end problem
-
seriesoftubes.converters.bamtofastq.read_files(files=None, no_gzip=False, single_stdout=<open file '<stdout>', mode 'w' at 0x7f7ed30871e0>)[source]
actually reads the SAM/BAM files
seriesoftubes.converters.bamtofastq2
Another module for converting bamtofastq, defaults to writing gzfiles
Accepts only one input file
Includes class for converting paired-end sequencing files to two fastq pipes
Supports SAM, BAM
-
class seriesoftubes.converters.bamtofastq2.PairedBAMToFastqConverter(file_, wd=None, stderr=None, logger=None)[source]
Works with any SAM/BAM file
-
seriesoftubes.converters.bamtofastq2.main()[source]
what to do if we execute the module as a script
(not intended for user by user)
seriesoftubes.converters.bamtotab
Convert BAM/SAM to tab-format
NAME SEQ1 QUAL1 SEQ2 QUAL2
files may be SAM or BAM (autodetected)
Output is always to stdout (err goes to stderr, redirect it if you need to)
-
seriesoftubes.converters.bamtotab.main()[source]
what to do if we execute the module as a script
bamtotab can only convert files because of the paired-end problem
seriesoftubes.converters.fastqtotab
Convert single or pairs of FASTQ files to tab-format
NAME SEQ1 QUAL1 (SEQ2 QUAL2)
Output is always to stdout (err goes to stderr, redirect it if you need to)
-
seriesoftubes.converters.fastqtotab.main()[source]
what to do if we execute the module as a script
fastqtotab can only convert files because of the paired-end problem
-
seriesoftubes.converters.fastqtotab.read_files(file1, file2, open_func)[source]
We do not validate records here