converters Package¶
bed_to_genetrack_converter
Module¶
bed_to_gff_converter
Module¶
bedgraph_to_array_tree_converter
Module¶
fasta_to_len
Module¶
Input: fasta, int Output: tabular Return titles with lengths of corresponding seq
fasta_to_tabular_converter
Module¶
Input: fasta Output: tabular
fastq_to_fqtoc
Module¶
-
galaxy.datatypes.converters.fastq_to_fqtoc.
main
()[source]¶ The format of the file is JSON:
{ "sections" : [ { "start" : "x", "end" : "y", "sequences" : "z" }, ... ]}
This works only for UNCOMPRESSED fastq files. The Python GzipFile does not provide seekable offsets via tell(), so clients just have to split the slow way
fastqsolexa_to_fasta_converter
Module¶
convert fastqsolexa file to separated sequence and quality files.
assume each sequence and quality score are contained in one line the order should be: 1st line: @title_of_seq 2nd line: nucleotides 3rd line: +title_of_qualityscore (might be skipped) 4th line: quality scores (in three forms: a. digits, b. ASCII codes, the first char as the coding base, c. ASCII codes without the first char.)
Usage: %python fastqsolexa_to_fasta_converter.py <your_fastqsolexa_filename> <output_seq_filename> <output_score_filename>
fastqsolexa_to_qual_converter
Module¶
convert fastqsolexa file to separated sequence and quality files.
assume each sequence and quality score are contained in one line the order should be: 1st line: @title_of_seq 2nd line: nucleotides 3rd line: +title_of_qualityscore (might be skipped) 4th line: quality scores (in three forms: a. digits, b. ASCII codes, the first char as the coding base, c. ASCII codes without the first char.)
Usage: %python fastqsolexa_to_qual_converter.py <your_fastqsolexa_filename> <output_seq_filename> <output_score_filename>
gff_to_bed_converter
Module¶
gff_to_interval_index_converter
Module¶
Convert from GFF file to interval index file.
- usage:
- python gff_to_interval_index_converter.py [input] [output]
interval_to_bed_converter
Module¶
interval_to_bedstrict_converter
Module¶
interval_to_coverage
Module¶
Converter to generate 3 (or 4) column base-pair coverage from an interval file.
- usage: %prog bed_file out_file
- -1, –cols1=N,N,N,N: Columns for chrom, start, end, strand in interval file -2, –cols2=N,N,N,N: Columns for chrom, start, end, strand in coverage file
-
class
galaxy.datatypes.converters.interval_to_coverage.
CoverageWriter
(out_stream=None, chromCol=0, positionCol=1, forwardCol=2, reverseCol=3)[source]¶ Bases:
object
-
galaxy.datatypes.converters.interval_to_coverage.
main
(interval, coverage)[source]¶ Uses a sliding window of partitions to count coverages. Every interval record adds its start and end to the partitions. The result is a list of partitions, or every position that has a (maybe) different number of basepairs covered. We don’t worry about merging because we pop as the sorted intervals are read in. As the input start positions exceed the partition positions in partitions, coverages are kicked out in bulk.
interval_to_fli
Module¶
Creates a feature location index (FLI) for a given BED/GFF file. FLI index has the form:
[line_length]
<symbol1_in_lowercase><tab><symbol1><tab><location>
<symbol2_in_lowercase><tab><symbol2><tab><location>
...
where location is formatted as:
contig:start-end
and symbols are sorted in lexigraphical order.
interval_to_interval_index_converter
Module¶
Convert from interval file to interval index file.
- usage: %prog <options> in_file out_file
- -c, –chr-col: chromosome column, default=1 -s, –start-col: start column, default=2 -e, –end-col: end column, default=3
interval_to_summary_tree_converter
Module¶
interval_to_tabix_converter
Module¶
Uses pysam to index a bgzipped interval file with tabix Supported presets: bed, gff, vcf
usage: %prog in_file out_file
lped_to_fped_converter
Module¶
-
galaxy.datatypes.converters.lped_to_fped_converter.
main
()[source]¶ call fbater need to work with rgenetics composite datatypes so in and out are html files with data in extrafiles path <command interpreter=”python”>rg_convert_lped_fped.py ‘$input1/$input1.metadata.base_name’ ‘$output1’ ‘$output1.extra_files_path’ </command>
lped_to_pbed_converter
Module¶
-
galaxy.datatypes.converters.lped_to_pbed_converter.
getMissval
(inped='')[source]¶ read some lines...ugly hack - try to guess missing value should be N or 0 but might be . or -
-
galaxy.datatypes.converters.lped_to_pbed_converter.
main
()[source]¶ need to work with rgenetics composite datatypes so in and out are html files with data in extrafiles path <command interpreter=”python”>lped_to_pbed_converter.py ‘$input1/$input1.metadata.base_name’ ‘$output1’ ‘$output1.extra_files_path’ ‘${GALAXY_DATA_INDEX_DIR}/rg/bin/plink’ </command>
maf_to_fasta_converter
Module¶
maf_to_interval_converter
Module¶
pbed_ldreduced_converter
Module¶
-
galaxy.datatypes.converters.pbed_ldreduced_converter.
main
()[source]¶ need to work with rgenetics composite datatypes so in and out are html files with data in extrafiles path
-
galaxy.datatypes.converters.pbed_ldreduced_converter.
makeLDreduced
(basename, infpath=None, outfpath=None, plinke='plink', forcerebuild=False, returnFname=False, winsize='60', winmove='40', r2thresh='0.1')[source]¶ not there so make and leave in output dir for post job hook to copy back into input extra files path for next time
pbed_to_lped_converter
Module¶
-
galaxy.datatypes.converters.pbed_to_lped_converter.
main
()[source]¶ need to work with rgenetics composite datatypes so in and out are html files with data in extrafiles path <command interpreter=”python”>pbed_to_lped_converter.py ‘$input1/$input1.metadata.base_name’ ‘$output1’ ‘$output1.extra_files_path’ ‘${GALAXY_DATA_INDEX_DIR}/rg/bin/plink’ </command>
picard_interval_list_to_bed6_converter
Module¶
sam_or_bam_to_summary_tree_converter
Module¶
sam_to_bam
Module¶
A wrapper script for converting SAM to BAM, with sorting. %prog input_filename.sam output_filename.bam
vcf_to_interval_index_converter
Module¶
Convert from VCF file to interval index file.
vcf_to_summary_tree_converter
Module¶
vcf_to_vcf_bgzip
Module¶
Uses pysam to bgzip a vcf file as-is. Headers, which are important, are kept. Original ordering, which may be specifically needed by tools or external display applications, is also maintained.
usage: %prog in_file out_file
wiggle_to_array_tree_converter
Module¶
wiggle_to_simple_converter
Module¶
Read a wiggle track and print out a series of lines containing “chrom position score”. Ignores track lines, handles bed, variableStep and fixedStep wiggle lines.