### Home Classes Methods

### In Files

- lib/bio/command.rb

### Namespace

- CLASS Bio::Command::Tmpdir

### Methods

- #call_command
- #call_command_fork
- #call_command_open3
- #call_command_popen
- #escape_shell
- #escape_shell_unix
- #escape_shell_windows
- #http_post_form
- #make_cgi_params
- #make_cgi_params_key_value
- #make_command_line
- #make_command_line_unix
- #make_command_line_windows
- #mktmpdir
- #new_http
- #no_fork?
- #post_form
- #query_command
- #query_command_fork
- #query_command_open3
- #query_command_popen
- #read_uri
- #remove_entry_secure
- #safe_command_line_array
- #start_http
- #windows_platform?

### Files

- KNOWN_ISSUES.rdoc
- README.rdoc
- README_DEV.rdoc
- RELEASE_NOTES.rdoc
- Changes-1.3.rdoc
- RELEASE_NOTES-1.4.0.rdoc
- RELEASE_NOTES-1.4.1.rdoc
- RELEASE_NOTES-1.4.2.rdoc

### Class/Module Index

Quicksearch

- Bio
- Bio::AAindex
- Bio::AAindex1
- Bio::AAindex2
- Bio::Abif
- Bio::Abif::DirectoryEntry
- Bio::Alignment
- Bio::Alignment::ArrayExtension
- Bio::Alignment::EnumerableExtension
- Bio::Alignment::FactoryTemplate
- Bio::Alignment::FactoryTemplate::FileInFileOut
- Bio::Alignment::FactoryTemplate::FileInFileOutWithTree
- Bio::Alignment::FactoryTemplate::FileInStdoutOut
- Bio::Alignment::FactoryTemplate::Simple
- Bio::Alignment::FactoryTemplate::StdinInFileOut
- Bio::Alignment::FactoryTemplate::WrapInputStdin
- Bio::Alignment::FactoryTemplate::WrapInputTempfile
- Bio::Alignment::FactoryTemplate::WrapOutputStdout
- Bio::Alignment::FactoryTemplate::WrapOutputTempfile
- Bio::Alignment::GAP
- Bio::Alignment::HashExtension
- Bio::Alignment::MultiFastaFormat
- Bio::Alignment::OriginalAlignment
- Bio::Alignment::OriginalPrivate
- Bio::Alignment::Output
- Bio::Alignment::PropertyMethods
- Bio::Alignment::SequenceArray
- Bio::Alignment::SequenceHash
- Bio::Alignment::Site
- Bio::Alignment::SiteMethods
- Bio::AminoAcid
- Bio::AminoAcid::Data
- Bio::Blast
- Bio::Blast::Bl2seq
- Bio::Blast::Bl2seq::Report
- Bio::Blast::Bl2seq::Report::HSP
- Bio::Blast::Bl2seq::Report::Hit
- Bio::Blast::Bl2seq::Report::Iteration
- Bio::Blast::Default
- Bio::Blast::Default::Report
- Bio::Blast::Default::Report::HSP
- Bio::Blast::Default::Report::Hit
- Bio::Blast::Default::Report::Iteration
- Bio::Blast::Default::Report_TBlast
- Bio::Blast::Fastacmd
- Bio::Blast::NCBIOptions
- Bio::Blast::RPSBlast
- Bio::Blast::RPSBlast::RPSBlastSplitter
- Bio::Blast::RPSBlast::Report
- Bio::Blast::RPSBlast::Report::FLATFILE_SPLITTER
- Bio::Blast::RPSBlast::Report::Iteration
- Bio::Blast::Remote
- Bio::Blast::Remote::DDBJ
- Bio::Blast::Remote::DDBJ::Information
- Bio::Blast::Remote::Ddbj
- Bio::Blast::Remote::GenomeNet
- Bio::Blast::Remote::GenomeNet::Information
- Bio::Blast::Remote::Genomenet
- Bio::Blast::Remote::Information
- Bio::Blast::Report
- Bio::Blast::Report::BlastXmlSplitter
- Bio::Blast::Report::FLATFILE_SPLITTER
- Bio::Blast::Report::Hit
- Bio::Blast::Report::Hsp
- Bio::Blast::Report::Iteration
- Bio::Blast::Report_tab
- Bio::Blast::WU
- Bio::Blast::WU::Report
- Bio::Blast::WU::Report::HSP
- Bio::Blast::WU::Report::Hit
- Bio::Blast::WU::Report::Iteration
- Bio::Blast::WU::Report_TBlast
- Bio::Blat
- Bio::Blat::Report
- Bio::Blat::Report::FLATFILE_SPLITTER
- Bio::Blat::Report::Hit
- Bio::Blat::Report::SegmentPair
- Bio::Blat::Report::SeqDesc
- Bio::ClustalW
- Bio::ClustalW::Report
- Bio::CodonTable
- Bio::ColorScheme
- Bio::Command
- Bio::Command::Tmpdir
- Bio::Command::Tmpdir::Remover
- Bio::ContingencyTable
- Bio::DAS
- Bio::DAS::DNA
- Bio::DAS::DSN
- Bio::DAS::ENTRY_POINT
- Bio::DAS::FEATURE
- Bio::DAS::GFF
- Bio::DAS::GROUP
- Bio::DAS::LINK
- Bio::DAS::SEGMENT
- Bio::DAS::SEQUENCE
- Bio::DAS::TARGET
- Bio::DAS::TYPE
- Bio::DAS::TYPES
- Bio::DB
- Bio::DBGET
- Bio::DDBJ
- Bio::DDBJ::REST
- Bio::DDBJ::REST::Blast
- Bio::DDBJ::REST::ClustalW
- Bio::DDBJ::REST::DDBJ
- Bio::DDBJ::REST::Mafft
- Bio::DDBJ::REST::RequestManager
- Bio::DDBJ::REST::WABItemplate
- Bio::DDBJ::XML
- Bio::DDBJ::XML::Blast
- Bio::DDBJ::XML::ClustalW
- Bio::DDBJ::XML::DDBJ
- Bio::DDBJ::XML::Fasta
- Bio::DDBJ::XML::GetEntry
- Bio::DDBJ::XML::Gib
- Bio::DDBJ::XML::Gtop
- Bio::DDBJ::XML::PML
- Bio::DDBJ::XML::RequestManager
- Bio::DDBJ::XML::RequestManager::REST
- Bio::DDBJ::XML::SRS
- Bio::DDBJ::XML::TxSearch
- Bio::EBI
- Bio::EBI::SOAP
- Bio::EBI::SOAP::Citation
- Bio::EBI::SOAP::ClustalW
- Bio::EBI::SOAP::Dbfetch
- Bio::EBI::SOAP::Emboss
- Bio::EBI::SOAP::Fasta
- Bio::EBI::SOAP::InterProScan
- Bio::EBI::SOAP::MPsrch
- Bio::EBI::SOAP::MSD
- Bio::EBI::SOAP::Muscle
- Bio::EBI::SOAP::Ontology
- Bio::EBI::SOAP::ScanPS
- Bio::EBI::SOAP::TCoffee
- Bio::EBI::SOAP::WUBlast
- Bio::EMBL
- Bio::EMBLDB
- Bio::EMBLDB::Common
- Bio::EMBOSS
- Bio::Ensembl
- Bio::Ensembl::Base
- Bio::Ensembl::Human
- Bio::Ensembl::Mouse
- Bio::FANTOM
- Bio::FANTOM::MaXML
- Bio::FANTOM::MaXML::Annotation
- Bio::FANTOM::MaXML::Annotation::DataSrc
- Bio::FANTOM::MaXML::Annotations
- Bio::FANTOM::MaXML::Cluster
- Bio::FANTOM::MaXML::Sequence
- Bio::FANTOM::MaXML::Sequences
- Bio::Fasta
- Bio::Fasta::Report
- Bio::Fasta::Report::FLATFILE_SPLITTER
- Bio::Fasta::Report::FastaFormat10Splitter
- Bio::Fasta::Report::Hit
- Bio::Fasta::Report::Hit::Query
- Bio::Fasta::Report::Hit::Target
- Bio::Fasta::Report::Program
- Bio::FastaDefline
- Bio::FastaFormat
- Bio::FastaNumericFormat
- Bio::Fastq
- Bio::Fastq::Error
- Bio::Fastq::Error::Diff_ids
- Bio::Fastq::Error::Long_qual
- Bio::Fastq::Error::No_atmark
- Bio::Fastq::Error::No_ids
- Bio::Fastq::Error::No_qual
- Bio::Fastq::Error::No_seq
- Bio::Fastq::Error::Qual_char
- Bio::Fastq::Error::Qual_range
- Bio::Fastq::Error::Seq_char
- Bio::Fastq::Error::Short_qual
- Bio::Fastq::Error::Skipped_unformatted_lines
- Bio::Fastq::FLATFILE_SPLITTER
- Bio::Fastq::FormatData
- Bio::Fastq::FormatData::FASTQ_ILLUMINA
- Bio::Fastq::FormatData::FASTQ_SANGER
- Bio::Fastq::FormatData::FASTQ_SOLEXA
- Bio::Feature
- Bio::Feature::Qualifier
- Bio::Features
- Bio::Fetch
- Bio::FlatFile
- Bio::FlatFile::AutoDetect
- Bio::FlatFile::AutoDetect::RuleDebug
- Bio::FlatFile::AutoDetect::RuleProc
- Bio::FlatFile::AutoDetect::RuleRegexp
- Bio::FlatFile::AutoDetect::RuleRegexp2
- Bio::FlatFile::AutoDetect::RuleSpecial
- Bio::FlatFile::AutoDetect::RuleTemplate
- Bio::FlatFile::AutoDetect::RulesArray
- Bio::FlatFile::BufferedInputStream
- Bio::FlatFile::Splitter
- Bio::FlatFile::Splitter::Default
- Bio::FlatFile::Splitter::LineOriented
- Bio::FlatFile::Splitter::Template
- Bio::FlatFile::UnknownDataFormatError
- Bio::FlatFileIndex
- Bio::FlatFileIndex::BDB_1
- Bio::FlatFileIndex::BDB_1::BDBMappingFile
- Bio::FlatFileIndex::BDB_1::PrimaryNameSpace
- Bio::FlatFileIndex::BDB_1::SecondaryNameSpace
- Bio::FlatFileIndex::BDBdefault
- Bio::FlatFileIndex::BDBwrapper
- Bio::FlatFileIndex::DEBUG
- Bio::FlatFileIndex::DataBank
- Bio::FlatFileIndex::FileID
- Bio::FlatFileIndex::FileIDs
- Bio::FlatFileIndex::Flat_1
- Bio::FlatFileIndex::Flat_1::FlatMappingFile
- Bio::FlatFileIndex::Flat_1::PrimaryNameSpace
- Bio::FlatFileIndex::Flat_1::Record
- Bio::FlatFileIndex::Flat_1::SecondaryNameSpace
- Bio::FlatFileIndex::Indexer
- Bio::FlatFileIndex::Indexer::NameSpace
- Bio::FlatFileIndex::Indexer::NameSpaces
- Bio::FlatFileIndex::Indexer::Parser
- Bio::FlatFileIndex::Indexer::Parser::BlastDefaultParser
- Bio::FlatFileIndex::Indexer::Parser::EMBLParser
- Bio::FlatFileIndex::Indexer::Parser::FastaFormatParser
- Bio::FlatFileIndex::Indexer::Parser::GenBankParser
- Bio::FlatFileIndex::Indexer::Parser::GenPeptParser
- Bio::FlatFileIndex::Indexer::Parser::MaXMLClusterParser
- Bio::FlatFileIndex::Indexer::Parser::MaXMLSequenceParser
- Bio::FlatFileIndex::Indexer::Parser::PDBChemicalComponentParser
- Bio::FlatFileIndex::Indexer::Parser::SPTRParser
- Bio::FlatFileIndex::Indexer::Parser::TemplateParser
- Bio::FlatFileIndex::NameSpaces
- Bio::FlatFileIndex::Results
- Bio::FlatFileIndex::Template
- Bio::FlatFileIndex::Template::NameSpace
- Bio::GCG
- Bio::GCG::Msf
- Bio::GCG::Seq
- Bio::GFF
- Bio::GFF::GFF2
- Bio::GFF::GFF2::Escape
- Bio::GFF::GFF2::MetaData
- Bio::GFF::GFF2::Record
- Bio::GFF::GFF2::Record::Value
- Bio::GFF::GFF3
- Bio::GFF::GFF3::Escape
- Bio::GFF::GFF3::Record
- Bio::GFF::GFF3::Record::Gap
- Bio::GFF::GFF3::Record::Gap::Code
- Bio::GFF::GFF3::Record::Target
- Bio::GFF::GFF3::RecordBoundary
- Bio::GFF::GFF3::SequenceRegion
- Bio::GFF::Record
- Bio::GO
- Bio::GO::External2go
- Bio::GO::GeneAssociation
- Bio::GO::Ontology
- Bio::GenBank
- Bio::GenBank::Locus
- Bio::GenPept
- Bio::GenPept::Locus
- Bio::Genscan
- Bio::Genscan::Report
- Bio::Genscan::Report::Exon
- Bio::Genscan::Report::Gene
- Bio::HGC
- Bio::HGC::HiGet
- Bio::HMMER
- Bio::HMMER::Report
- Bio::HMMER::Report::Hit
- Bio::HMMER::Report::Hsp
- Bio::Hinv
- Bio::Hinv::Acc2hit
- Bio::Hinv::Common
- Bio::Hinv::Hit2acc
- Bio::Hinv::HitCnt
- Bio::Hinv::HitDefinition
- Bio::Hinv::HitPubmedId
- Bio::Hinv::HitXML
- Bio::Hinv::Hix2hit
- Bio::Hinv::HixCnt
- Bio::Hinv::HixRepresent
- Bio::Hinv::HixXML
- Bio::Hinv::IdSearch
- Bio::Hinv::KeywordSearch
- Bio::Iprscan
- Bio::Iprscan::Report
- Bio::Iprscan::Report::Match
- Bio::KEGG
- Bio::KEGG::API
- Bio::KEGG::BRITE
- Bio::KEGG::COMPOUND
- Bio::KEGG::Common
- Bio::KEGG::Common::DblinksAsHash
- Bio::KEGG::Common::GenesAsHash
- Bio::KEGG::Common::ModulesAsHash
- Bio::KEGG::Common::OrthologsAsHash
- Bio::KEGG::Common::PathwaysAsHash
- Bio::KEGG::Common::References
- Bio::KEGG::Common::StringsAsHash
- Bio::KEGG::DRUG
- Bio::KEGG::ENZYME
- Bio::KEGG::EXPRESSION
- Bio::KEGG::GENES
- Bio::KEGG::GENOME
- Bio::KEGG::GLYCAN
- Bio::KEGG::KGML
- Bio::KEGG::KGML::Entry
- Bio::KEGG::KGML::Graphics
- Bio::KEGG::KGML::Product
- Bio::KEGG::KGML::Reaction
- Bio::KEGG::KGML::Relation
- Bio::KEGG::KGML::Substrate
- Bio::KEGG::KGML::SubstrateProduct
- Bio::KEGG::Keggtab
- Bio::KEGG::Keggtab::DB
- Bio::KEGG::MODULE
- Bio::KEGG::ORTHOLOGY
- Bio::KEGG::PATHWAY
- Bio::KEGG::REACTION
- Bio::KEGG::Taxonomy
- Bio::KEGGDB
- Bio::LITDB
- Bio::Lasergene
- Bio::Location
- Bio::Locations
- Bio::MAFFT
- Bio::MAFFT::Report
- Bio::MEDLINE
- Bio::Map
- Bio::Map::ActsLikeMap
- Bio::Map::ActsLikeMarker
- Bio::Map::Mapping
- Bio::Map::Marker
- Bio::Map::SimpleMap
- Bio::Meme
- Bio::Meme::Mast
- Bio::Meme::Mast::Report
- Bio::Meme::Motif
- Bio::Muscle
- Bio::Muscle::DEFAULT_PARSER
- Bio::NBRF
- Bio::NCBI
- Bio::NCBI::REST
- Bio::NCBI::REST::EFetch
- Bio::NCBI::REST::EFetch::Methods
- Bio::NCBI::REST::ESearch
- Bio::NCBI::REST::ESearch::Methods
- Bio::NCBI::SOAP
- Bio::NCBI::SOAP::EFetch
- Bio::NCBI::SOAP::EFetchLite
- Bio::NCBI::SOAP::EUtils
- Bio::NCBI::SOAP::EUtilsLite
- Bio::NCBIDB
- Bio::NCBIDB::Common
- Bio::Newick
- Bio::Newick::Edge
- Bio::Newick::Node
- Bio::Newick::ParseError
- Bio::Nexus
- Bio::Nexus::CharactersBlock
- Bio::Nexus::DataBlock
- Bio::Nexus::DistancesBlock
- Bio::Nexus::GenericBlock
- Bio::Nexus::NexusMatrix
- Bio::Nexus::NexusMatrix::NexusMatrixError
- Bio::Nexus::NexusParseError
- Bio::Nexus::TaxaBlock
- Bio::Nexus::TreesBlock
- Bio::Nexus::Util
- Bio::NucleicAcid
- Bio::NucleicAcid::Data
- Bio::PAML
- Bio::PAML::Baseml
- Bio::PAML::Baseml::Report
- Bio::PAML::Codeml
- Bio::PAML::Codeml::Model
- Bio::PAML::Codeml::PositiveSite
- Bio::PAML::Codeml::PositiveSites
- Bio::PAML::Codeml::Rates
- Bio::PAML::Codeml::Report
- Bio::PAML::Codeml::ReportError
- Bio::PAML::Codeml::ReportSingle
- Bio::PAML::Common
- Bio::PAML::Common::Report
- Bio::PAML::Yn00
- Bio::PAML::Yn00::Report
- Bio::PDB
- Bio::PDB::AtomFinder
- Bio::PDB::Chain
- Bio::PDB::ChainFinder
- Bio::PDB::ChemicalComponent
- Bio::PDB::ChemicalComponent::Record
- Bio::PDB::Coordinate
- Bio::PDB::DataType
- Bio::PDB::DataType::ConstLikeMethod
- Bio::PDB::DataType::Pdb_AChar
- Bio::PDB::DataType::Pdb_Atom
- Bio::PDB::DataType::Pdb_Character
- Bio::PDB::DataType::Pdb_Date
- Bio::PDB::DataType::Pdb_IDcode
- Bio::PDB::DataType::Pdb_Integer
- Bio::PDB::DataType::Pdb_LString
- Bio::PDB::DataType::Pdb_List
- Bio::PDB::DataType::Pdb_Real
- Bio::PDB::DataType::Pdb_Residue_name
- Bio::PDB::DataType::Pdb_SList
- Bio::PDB::DataType::Pdb_Specification_list
- Bio::PDB::DataType::Pdb_String
- Bio::PDB::DataType::Pdb_StringRJ
- Bio::PDB::DataType::Pdb_SymOP
- Bio::PDB::HetatmFinder
- Bio::PDB::Heterogen
- Bio::PDB::HeterogenFinder
- Bio::PDB::Model
- Bio::PDB::ModelFinder
- Bio::PDB::Record
- Bio::PDB::Record::ANISOU
- Bio::PDB::Record::ATOM
- Bio::PDB::Record::HETATM
- Bio::PDB::Record::Jrnl
- Bio::PDB::Record::Remark1
- Bio::PDB::Record::Remark2
- Bio::PDB::Residue
- Bio::PDB::ResidueFinder
- Bio::PDB::Utils
- Bio::PROSITE
- Bio::PSORT
- Bio::PSORT::CGIDriver
- Bio::PSORT::IPSORT
- Bio::PSORT::PSORT1
- Bio::PSORT::PSORT1::Remote
- Bio::PSORT::PSORT1::Report
- Bio::PSORT::PSORT2
- Bio::PSORT::PSORT2::Remote
- Bio::PSORT::PSORT2::Report
- Bio::PSORT::PSORTB
- Bio::PSORT::WoLF_PSORT
- Bio::PTS1
- Bio::PTS1::Report
- Bio::Pathway
- Bio::Phylip
- Bio::Phylip::DistanceMatrix
- Bio::Phylip::PhylipFormat
- Bio::PhyloXML
- Bio::PhyloXML::Accession
- Bio::PhyloXML::Annotation
- Bio::PhyloXML::BinaryCharacters
- Bio::PhyloXML::BranchColor
- Bio::PhyloXML::CladeRelation
- Bio::PhyloXML::Confidence
- Bio::PhyloXML::Date
- Bio::PhyloXML::Distribution
- Bio::PhyloXML::DomainArchitecture
- Bio::PhyloXML::Events
- Bio::PhyloXML::Id
- Bio::PhyloXML::Node
- Bio::PhyloXML::Other
- Bio::PhyloXML::Parser
- Bio::PhyloXML::Point
- Bio::PhyloXML::Polygon
- Bio::PhyloXML::Property
- Bio::PhyloXML::ProteinDomain
- Bio::PhyloXML::Reference
- Bio::PhyloXML::Sequence
- Bio::PhyloXML::SequenceRelation
- Bio::PhyloXML::Taxonomy
- Bio::PhyloXML::Tree
- Bio::PhyloXML::Uri
- Bio::PhyloXML::Writer
- Bio::Probcons
- Bio::Probcons::DEFAULT_PARSER
- Bio::PubMed
- Bio::REBASE
- Bio::RefSeq
- Bio::Reference
- Bio::References
- Bio::Registry
- Bio::Registry::DB
- Bio::RestrictionEnzyme
- Bio::RestrictionEnzyme::Analysis
- Bio::RestrictionEnzyme::CutSymbol
- Bio::RestrictionEnzyme::CutSymbol::CutSymbol__
- Bio::RestrictionEnzyme::DenseIntArray
- Bio::RestrictionEnzyme::DoubleStranded
- Bio::RestrictionEnzyme::DoubleStranded::AlignedStrands
- Bio::RestrictionEnzyme::DoubleStranded::CutLocationPair
- Bio::RestrictionEnzyme::DoubleStranded::CutLocationPairInEnzymeNotation
- Bio::RestrictionEnzyme::DoubleStranded::CutLocations
- Bio::RestrictionEnzyme::DoubleStranded::CutLocationsInEnzymeNotation
- Bio::RestrictionEnzyme::DoubleStranded::EnzymeAction
- Bio::RestrictionEnzyme::Fragments
- Bio::RestrictionEnzyme::Range
- Bio::RestrictionEnzyme::Range::CutRange
- Bio::RestrictionEnzyme::Range::CutRanges
- Bio::RestrictionEnzyme::Range::HorizontalCutRange
- Bio::RestrictionEnzyme::Range::SequenceRange
- Bio::RestrictionEnzyme::Range::SequenceRange::CalculatedCuts
- Bio::RestrictionEnzyme::Range::SequenceRange::Fragment
- Bio::RestrictionEnzyme::Range::SequenceRange::Fragments
- Bio::RestrictionEnzyme::Range::VerticalCutRange
- Bio::RestrictionEnzyme::SingleStrand
- Bio::RestrictionEnzyme::SingleStrand::CutLocationsInEnzymeNotation
- Bio::RestrictionEnzyme::SingleStrandComplement
- Bio::RestrictionEnzyme::SortedNumArray
- Bio::RestrictionEnzyme::StringFormatting
- Bio::SOAPWSDL
- Bio::SOFT
- Bio::SOSUI
- Bio::SOSUI::Report
- Bio::SOSUI::Report::TMH
- Bio::SPTR
- Bio::SQL
- Bio::SQL::Biodatabase
- Bio::SQL::Bioentry
- Bio::SQL::BioentryDbxref
- Bio::SQL::BioentryPath
- Bio::SQL::BioentryQualifierValue
- Bio::SQL::BioentryReference
- Bio::SQL::BioentryRelationship
- Bio::SQL::Biosequence
- Bio::SQL::Comment
- Bio::SQL::Dbxref
- Bio::SQL::DbxrefQualifierValue
- Bio::SQL::DummyBase
- Bio::SQL::Location
- Bio::SQL::LocationQualifierValue
- Bio::SQL::Ontology
- Bio::SQL::Reference
- Bio::SQL::Seqfeature
- Bio::SQL::SeqfeatureDbxref
- Bio::SQL::SeqfeaturePath
- Bio::SQL::SeqfeatureQualifierValue
- Bio::SQL::SeqfeatureRelationship
- Bio::SQL::Sequence
- Bio::SQL::Taxon
- Bio::SQL::TaxonName
- Bio::SQL::Term
- Bio::SQL::TermDbxref
- Bio::SQL::TermPath
- Bio::SQL::TermRelationship
- Bio::SQL::TermRelationshipTerm
- Bio::SQL::TermSynonym
- Bio::SangerChromatogram
- Bio::Scf
- Bio::Sequence
- Bio::Sequence::AA
- Bio::Sequence::Adapter
- Bio::Sequence::Adapter::BioSQL
- Bio::Sequence::Adapter::EMBL
- Bio::Sequence::Adapter::FastaFormat
- Bio::Sequence::Adapter::FastaNumericFormat
- Bio::Sequence::Adapter::Fastq
- Bio::Sequence::Adapter::GenBank
- Bio::Sequence::Adapter::SangerChromatogram
- Bio::Sequence::Common
- Bio::Sequence::DBLink
- Bio::Sequence::Format
- Bio::Sequence::Format::AminoFormatter
- Bio::Sequence::Format::Formatter
- Bio::Sequence::Format::Formatter::Fasta
- Bio::Sequence::Format::Formatter::Fasta_ncbi
- Bio::Sequence::Format::Formatter::Fasta_numeric
- Bio::Sequence::Format::Formatter::Fastq
- Bio::Sequence::Format::Formatter::Fastq_illumina
- Bio::Sequence::Format::Formatter::Fastq_sanger
- Bio::Sequence::Format::Formatter::Fastq_solexa
- Bio::Sequence::Format::Formatter::Qual
- Bio::Sequence::Format::Formatter::Raw
- Bio::Sequence::Format::FormatterBase
- Bio::Sequence::Format::INSDFeatureHelper
- Bio::Sequence::Format::NucFormatter
- Bio::Sequence::Format::NucFormatter::Embl
- Bio::Sequence::Format::NucFormatter::Genbank
- Bio::Sequence::NA
- Bio::Sequence::NA::MidiTrack
- Bio::Sequence::QualityScore
- Bio::Sequence::QualityScore::Converter
- Bio::Sequence::QualityScore::Phred
- Bio::Sequence::QualityScore::Solexa
- Bio::Sequence::SequenceMasker
- Bio::Shell
- Bio::Shell::ColoredCodonTable
- Bio::Shell::Core
- Bio::Shell::Demo
- Bio::Shell::Ghost
- Bio::Shell::Irb
- Bio::Shell::Private
- Bio::Shell::Script
- Bio::Shell::Setup
- Bio::Shell::Web
- Bio::Shell::Web::Results
- Bio::SiRNA
- Bio::SiRNA::Pair
- Bio::SiRNA::ShRNA
- Bio::Sim4
- Bio::Sim4::Report
- Bio::Sim4::Report::Hit
- Bio::Sim4::Report::Segment
- Bio::Sim4::Report::SegmentPair
- Bio::Sim4::Report::SeqDesc
- Bio::Spidey
- Bio::Spidey::Report
- Bio::Spidey::Report::Hit
- Bio::Spidey::Report::Segment
- Bio::Spidey::Report::SegmentPair
- Bio::Spidey::Report::SeqDesc
- Bio::SwissProt
- Bio::TMHMM
- Bio::TMHMM::Report
- Bio::TMHMM::TMH
- Bio::TRANSFAC
- Bio::TRANSFAC::CELL
- Bio::TRANSFAC::CLASS
- Bio::TRANSFAC::FACTOR
- Bio::TRANSFAC::GENE
- Bio::TRANSFAC::MATRIX
- Bio::TRANSFAC::SITE
- Bio::TargetP
- Bio::TargetP::Report
- Bio::Taxonomy
- Bio::Tcoffee
- Bio::Tcoffee::DEFAULT_PARSER
- Bio::TogoWS
- Bio::TogoWS::AccessWait
- Bio::TogoWS::REST
- Bio::TrEMBL
- Bio::Tree
- Bio::Tree::Edge
- Bio::Tree::NoPathError
- Bio::Tree::Node
- Bio::UniProt
- BiorubyController
- BiorubyGenerator
- BiorubyHelper
- Hash
- Object
- String

No matching classes.

# Bio::Command

Bio::Command is a collection of useful methods for execution of external commands or web applications. Any wrapper class for applications shall use this class.

Library internal use only. Users should not directly use it.

### Constants

QUOTE_CHARS_WINDOWS
UNESCAPABLE_CHARS
UNSAFE_CHARS_UNIX

### Public Instance Methods

call_command(cmd, options = {}) click to toggle source

Executes the program. Automatically select popen for Ruby 1.9 or Windows environment and fork for the others. A block must be given. An IO object is passed to the block.

Available options:

    :chdir => "path" : changes working directory to the specified path.

Arguments:

- (required) cmd: Array containing String objects

- (optional) options: Hash

Returns | (undefined)

    # File lib/bio/command.rb, line 196
    def call_command(cmd, options = {}, &block) #:yields: io
      if RUBY_VERSION >= "1.9.0" then
        return call_command_popen(cmd, options, &block)
      elsif no_fork? then
        call_command_popen(cmd, options, &block)
      else
        begin
          call_command_fork(cmd, options, &block)
        rescue NotImplementedError
          # fork(2) not implemented
          @@no_fork = true
          call_command_popen(cmd, options, &block)
        end
      end
    end

call_command_fork(cmd, options = {}) click to toggle source

This method is internally called from the call_command method. In normal case, use call_command, and do not call this method directly.

Executes the program via fork (by using IO.popen("-")) and exec. A block must be given. An IO object is passed to the block.

See the document of call_command for available options.

Note for Ruby 1.8: In Ruby 1.8, from the view point of security, this method is recommended rather than call_command_popen. However, this method might have problems with multi-threads.

Note for Ruby 1.9: In Ruby 1.9, this method can not be used, because Thread.critical is removed. In Ruby 1.9, call_command_popen is safe and robust enough, and is the recommended way, because IO.popen is improved to get a command-line as an array without calling shell.

Arguments:

- (required) cmd: Array containing String objects

- (optional) options: Hash

Returns | (undefined)

    # File lib/bio/command.rb, line 373
    def call_command_fork(cmd, options = {})
      dir = options[:chdir]
      cmd = safe_command_line_array(cmd)
      begin
      tc, Thread.critical, flag0, flag1 = Thread.critical, true, true, true
      IO.popen("-", "r+") do |io|
        if io then
          # parent
          flag0, Thread.critical, flag1 = false, tc, false
          yield io
        else
          # child
          Thread.critical = true # for safety, though already true
          GC.disable
          # chdir to options[:chdir] if available
          begin
            Dir.chdir(dir) if dir
          rescue Exception
            Process.exit!(1)
          end
          # executing the command
          begin
            Kernel.exec(*cmd)
          rescue Errno::ENOENT, Errno::EACCES
            Process.exit!(127)
          rescue Exception
          end
          Process.exit!(1)
        end
      end
      ensure
        # When IO.popen("-") raises error, Thread.critical will be set here.
        Thread.critical = tc if flag0 or flag1
        #warn 'Thread.critical might have wrong value.' if flag0 != flag1
      end
    end

call_command_open3(cmd) click to toggle source

Executes the program via Open3.popen3 A block must be given. IO objects are passed to the block.

You would use this method only when you really need to get stderr.

Arguments:

- (required) cmd: Array containing String objects

Returns | (undefined)

    # File lib/bio/command.rb, line 419
    def call_command_open3(cmd)
      cmd = safe_command_line_array(cmd)
      Open3.popen3(*cmd) do |pin, pout, perr|
        yield pin, pout, perr
      end
    end

call_command_popen(cmd, options = {}, &block) click to toggle source

This method is internally called from the call_command method. In normal case, use call_command, and do not call this method directly.

Executes the program via IO.popen for OS which doesn't support fork. A block must be given. An IO object is passed to the block.

See the document of call_command for available options.

Note for Ruby 1.8: In Ruby 1.8, although shell unsafe characters are escaped. If inescapable characters exists, it raises RuntimeError. So, call_command_fork is normally recommended.

Note for Ruby 1.9: In Ruby 1.9, call_command_popen is safe and robust enough, and is the recommended way, because IO.popen is improved to get a command-line as an array without calling shell.

Arguments:

- (required) cmd: Array containing String objects

- (optional) options: Hash

Returns | (undefined)

    # File lib/bio/command.rb, line 235
    def call_command_popen(cmd, options = {}, &block)
      if RUBY_VERSION >= "1.9.0" then
        if RUBY_ENGINE == 'jruby' then
          _call_command_popen_jruby19(cmd, options, &block)
        else
          _call_command_popen_ruby19(cmd, options, &block)
        end
      else
        _call_command_popen_ruby18(cmd, options, &block)
      end
    end

escape_shell(str) click to toggle source

Escape special characters in command line string.

Arguments:

- (required) str: String

Returns | String object

    # File lib/bio/command.rb, line 121
    def escape_shell(str)
      if windows_platform? then
        escape_shell_windows(str)
      else
        escape_shell_unix(str)
      end
    end

escape_shell_unix(str) click to toggle source

Escape special characters in command line string for UNIX shells.

Arguments:

- (required) str: String

Returns | String object

    # File lib/bio/command.rb, line 110
    def escape_shell_unix(str)
      str = str.to_s
      raise 'cannot escape control characters' if UNESCAPABLE_CHARS =~ str
      str.gsub(UNSAFE_CHARS_UNIX) { |x| "\\#{x}" }
    end

escape_shell_windows(str) click to toggle source

Escape special characters in command line string for cmd.exe on Windows.

Arguments:

- (required) str: String

Returns | String object

    # File lib/bio/command.rb, line 95
    def escape_shell_windows(str)
      str = str.to_s
      raise 'cannot escape control characters' if UNESCAPABLE_CHARS =~ str
      if QUOTE_CHARS_WINDOWS =~ str then
        '"' + str.gsub(/\"/, '""') + '"'
      else
        String.new(str)
      end
    end

http_post_form(http, path, params = nil, header = {}) click to toggle source

Same as:

    http = Net::HTTP.new(...); http.post_form(path, params)

and it uses proxy if an environment variable (same as OpenURI.open_uri) is set. In addition, `header` can be set. (Note that Content-Type and Content-Length are automatically set by default.) `uri` must be a URI object, `params` must be a hash, and `header` must be a hash.

Arguments:

- (required) http: Net::HTTP object or compatible object

- (required) path: String

- (optional) params: Hash containing parameters

- (optional) header: Hash containing header strings

Returns | (same as Net::HTTP::post_form)

    # File lib/bio/command.rb, line 775
    def http_post_form(http, path, params = nil, header = {})
      data = make_cgi_params(params)

      hash = {
        'Content-Type'   => 'application/x-www-form-urlencoded',
        'Content-Length' => data.length.to_s
      }
      hash.update(header)

      http.post(path, data, hash)
    end

make_cgi_params(params) click to toggle source

Builds parameter string for from Hash of parameters for application/x-www-form-urlencoded.

Arguments:

- (required) params: Hash containing parameters

Returns | String

    # File lib/bio/command.rb, line 829
    def make_cgi_params(params)
      data = ""
      case params
      when Hash
        data = params.map do |key, val|
          make_cgi_params_key_value(key, val)
        end.join('&')
      when Array
        case params.first
        when Hash
          data = params.map do |hash|
            hash.map do |key, val|
              make_cgi_params_key_value(key, val)
            end
          end.join('&')
        when Array
          data = params.map do |key, val|
            make_cgi_params_key_value(key, val)
          end.join('&')
        when String
          data = params.map do |str|
            key, val = str.split(/\=/, 2)
            if val then
              make_cgi_params_key_value(key, val)
            else
              CGI.escape(str)
            end
          end.join('&')
        end
      when String
        data = URI.escape(params.strip)
      end
      return data
    end

make_cgi_params_key_value(key, value) click to toggle source

Builds parameter string for from a key string and a value (or values) for application/x-www-form-urlencoded.

Arguments:

- (required) key: String

- (required) value: String or Array containing String

Returns | String

    # File lib/bio/command.rb, line 872
    def make_cgi_params_key_value(key, value)
      result = []
      case value
      when Array
        value.each do |val|
          result << [key, val].map {|x| CGI.escape(x.to_s) }.join('=')
        end
      else
        result << [key, value].map {|x| CGI.escape(x.to_s) }.join('=')
      end
      return result
    end

make_command_line(ary) click to toggle source

Generate command line string with special characters escaped.

Arguments:

- (required) ary: Array containing String objects

Returns | String object

    # File lib/bio/command.rb, line 134
    def make_command_line(ary)
      if windows_platform? then
        make_command_line_windows(ary)
      else
        make_command_line_unix(ary)
      end
    end

make_command_line_unix(ary) click to toggle source

Generate command line string with special characters escaped for UNIX shells.

Arguments:

- (required) ary: Array containing String objects

Returns | String object

    # File lib/bio/command.rb, line 158
    def make_command_line_unix(ary)
      ary.collect { |str| escape_shell_unix(str) }.join(" ")
    end

make_command_line_windows(ary) click to toggle source

Generate command line string with special characters escaped for cmd.exe on Windows.

Arguments:

- (required) ary: Array containing String objects

Returns | String object

    # File lib/bio/command.rb, line 148
    def make_command_line_windows(ary)
      ary.collect { |str| escape_shell_windows(str) }.join(" ")
    end

mktmpdir(prefix_suffix = nil, tmpdir = nil, &block) click to toggle source

Backport of Dir.mktmpdir in Ruby 1.9.

Same as Dir.mktmpdir(prefix_suffix) in Ruby 1.9.

Arguments:

- (optional) prefix_suffix: String (or Array, etc.)

- (optional) tmpdir: String: temporary directory's path

    # File lib/bio/command.rb, line 573
    def mktmpdir(prefix_suffix = nil, tmpdir = nil, &block)
      begin
        Dir.mktmpdir(prefix_suffix, tmpdir, &block)
      rescue NoMethodError
        # backported from Ruby 1.9.2-preview1.
        # ***** Below is excerpted from Ruby 1.9.2-preview1's lib/tmpdir.rb ****
        # ***** Be careful about copyright. ****
        case prefix_suffix
        when nil
          prefix = "d"
          suffix = ""
        when String
          prefix = prefix_suffix
          suffix = ""
        when Array
          prefix = prefix_suffix[0]
          suffix = prefix_suffix[1]
        else
          raise ArgumentError, "unexpected prefix_suffix: #{prefix_suffix.inspect}"
        end
        tmpdir ||= Dir.tmpdir
        t = Time.now.strftime("%Y%m%d")
        n = nil
        begin
          path = "#{tmpdir}/#{prefix}#{t}-#{$$}-#{rand(0x100000000).to_s(36)}"
          path << "-#{n}" if n
          path << suffix
          Dir.mkdir(path, 0700)
        rescue Errno::EEXIST
          n ||= 0
          n += 1
          retry
        end

        if block_given?
          begin
            yield path
          ensure
            remove_entry_secure path
          end
        else
          path
        end
        # ***** Above is excerpted from Ruby 1.9.2-preview1's lib/tmpdir.rb ****
      end
    end

new_http(address, port = 80) click to toggle source

Same as:

    Net::HTTP.new(address, port)

and it uses proxy if an environment variable (same as OpenURI.open_uri) is set.

Arguments:

- (required) address: String containing host name or IP address

- (optional) port: port (sanme as Net::HTTP::start)

Returns | (same as Net::HTTP.new except for proxy support)

    # File lib/bio/command.rb, line 745
    def new_http(address, port = 80)
      uri = URI.parse("http://#{address}:#{port}")
      # Note: URI#find_proxy is an unofficial method defined in open-uri.rb.
      # If the spec of open-uri.rb would be changed, we should change below.
      if proxyuri = uri.find_proxy then
        raise 'Non-HTTP proxy' if proxyuri.class != URI::HTTP
        Net::HTTP.new(address, port, proxyuri.host, proxyuri.port)
      else
        Net::HTTP.new(address, port)
      end
    end

no_fork?() click to toggle source

CAUTION Bio::Command INTERNAL USE ONLY. Users must NOT use the method. The method will be removed when it is not needed.

Checks if the OS does not support fork(2) system call. When not supported, it returns true. When supported or unknown, it returns false or nil.

Known issues:

- It might make a mistake in minor platforms/architectures/interpreters.

Returns | true, false or nil.

    # File lib/bio/command.rb, line 80
    def no_fork?
      if (defined?(@@no_fork) && @@no_fork) or
          windows_platform? or /java/ =~ RUBY_PLATFORM then
        true
      else
        false
      end
    end

post_form(uri, params = nil, header = {}) click to toggle source

Same as: Net::HTTP.post_form(uri, params) and it uses proxy if an environment variable (same as OpenURI.open_uri) is set. In addition, `header` can be set. (Note that Content-Type and Content-Length are automatically set by default.) `uri` must be a URI object, `params` must be a hash, and `header` must be a hash.

Arguments:

- (required) uri: URI object or String

- (optional) params: Hash containing parameters

- (optional) header: Hash containing header strings

Returns | (same as Net::HTTP::post_form)

    # File lib/bio/command.rb, line 804
    def post_form(uri, params = nil, header = {})
      unless uri.is_a?(URI)
        uri = URI.parse(uri)
      end

      data = make_cgi_params(params)

      hash = {
        'Content-Type'   => 'application/x-www-form-urlencoded',
        'Content-Length' => data.length.to_s
      }
      hash.update(header)

      start_http(uri.host, uri.port) do |http|
        http.post(uri.path, data, hash)
      end
    end

query_command(cmd, query = nil, options = {}) click to toggle source

Executes the program with the query (String) given to the standard input, waits the program termination, and returns the output data printed to the standard output as a string.

Automatically select popen for Ruby 1.9 or Windows environment and fork for the others.

Available options:

    :chdir => "path" : changes working directory to the specified path.

Arguments:

- (required) cmd: Array containing String objects

- (optional) query: String

- (optional) options: Hash

Returns | String or nil

    # File lib/bio/command.rb, line 442
    def query_command(cmd, query = nil, options = {})
      if RUBY_VERSION >= "1.9.0" then
        return query_command_popen(cmd, query, options)
      elsif no_fork? then
        query_command_popen(cmd, query, options)
      else
        begin
          query_command_fork(cmd, query, options)
        rescue NotImplementedError
          # fork(2) not implemented
          @@no_fork = true
          query_command_fork(cmd, query, options)
        end
      end
    end

query_command_fork(cmd, query = nil, options = {}) click to toggle source

This method is internally called from the query_command method. In normal case, use query_command, and do not call this method directly.

Executes the program with the query (String) given to the standard input, waits the program termination, and returns the output data printed to the standard output as a string.

Fork (by using IO.popen("-")) and exec is used to execute the program.

See the document of query_command for available options.

See the document of call_command_fork for the security and Ruby version specific issues.

Arguments:

- (required) cmd: Array containing String objects

- (optional) query: String

- (optional) options: Hash

Returns | String or nil

    # File lib/bio/command.rb, line 507
    def query_command_fork(cmd, query = nil, options = {})
      ret = nil
      call_command_fork(cmd, options) do |io|
        io.sync = true
        io.print query if query
        io.close_write
        ret = io.read
      end
      ret
    end

query_command_open3(cmd, query = nil) click to toggle source

Executes the program via Open3.popen3 with the query (String) given to the stain, waits the program termination, and returns the data from stdout and stderr as an array of the strings.

You would use this method only when you really need to get stderr.

Arguments:

- (required) cmd: Array containing String objects

- (optional) query: String

Returns | Array containing 2 objects: output string (or nil) and stderr string (or nil)

    # File lib/bio/command.rb, line 529
    def query_command_open3(cmd, query = nil)
      errorlog = nil
      cmd = safe_command_line_array(cmd)
      Open3.popen3(*cmd) do |pin, pout, perr|
        perr.sync = true
        t = Thread.start { errorlog = perr.read }
        begin
          pin.print query if query
          pin.close
          output = pout.read
        ensure
          t.join
        end
        [ output, errorlog ]
      end
    end

query_command_popen(cmd, query = nil, options = {}) click to toggle source

This method is internally called from the query_command method. In normal case, use query_command, and do not call this method directly.

Executes the program with the query (String) given to the standard input, waits the program termination, and returns the output data printed to the standard output as a string.

See the document of query_command for available options.

See the document of call_command_popen for the security and Ruby version specific issues.

Arguments:

- (required) cmd: Array containing String objects

- (optional) query: String

- (optional) options: Hash

Returns | String or nil

    # File lib/bio/command.rb, line 476
    def query_command_popen(cmd, query = nil, options = {})
      ret = nil
      call_command_popen(cmd, options) do |io|
        io.sync = true
        io.print query if query
        io.close_write
        ret = io.read
      end
      ret
    end

read_uri(uri) click to toggle source

Same as OpenURI.open_uri(uri).read and it uses proxy if an environment variable (same as OpenURI.open_uri) is set.

Arguments:

- (required) uri: URI object or String

Returns | String

    # File lib/bio/command.rb, line 706
    def read_uri(uri)
      OpenURI.open_uri(uri).read
    end

remove_entry_secure(path, force = false) click to toggle source

Same as FileUtils.remove_entry_secure after Ruby 1.8.3. In Ruby 1.8.2 or previous version, it only shows warning message and does nothing.

It is strongly recommended using Ruby 1.8.5 or later.

Arguments:

- (required) path: String

- (optional) force: boolean

    # File lib/bio/command.rb, line 555
    def remove_entry_secure(path, force = false)
      begin
        FileUtils.remove_entry_secure(path, force)
      rescue NoMethodError
        warn "The temporary file or directory is not removed because of the lack of FileUtils.remove_entry_secure. Use Ruby 1.8.3 or later (1.8.5 or later is strongly recommended): #{path}"
        nil
      end
    end

safe_command_line_array(ary) click to toggle source

Returns an Array of command-line command and arguments that can be safely passed to Kernel.exec etc. If the given array is already safe (or empty), returns the given array.

Arguments:

- (required) ary: Array

Returns | Array

    # File lib/bio/command.rb, line 169
    def safe_command_line_array(ary)
      ary = ary.to_ary
      return ary if ary.size >= 2 or ary.empty?
      if ary.size != 1 then
        raise 'Bug: assersion of ary.size == 1 failed'
      end
      arg0 = ary[0]
      begin
        arg0 = arg0.to_ary
      rescue NoMethodError
        arg0 = [ arg0, arg0 ]
      end
      [ arg0 ]
    end

start_http(address, port = 80, &block) click to toggle source

Same as:

    Net::HTTP.start(address, port)

and it uses proxy if an environment variable (same as OpenURI.open_uri) is set.

Arguments:

- (required) address: String containing host name or IP address

- (optional) port: port (sanme as Net::HTTP::start)

Returns | (same as Net::HTTP::start except for proxy support)

    # File lib/bio/command.rb, line 721
    def start_http(address, port = 80, &block)
      uri = URI.parse("http://#{address}:#{port}")
      # Note: URI#find_proxy is an unofficial method defined in open-uri.rb.
      # If the spec of open-uri.rb would be changed, we should change below.
      if proxyuri = uri.find_proxy then
        raise 'Non-HTTP proxy' if proxyuri.class != URI::HTTP
        http = Net::HTTP.Proxy(proxyuri.host, proxyuri.port)
      else
        http = Net::HTTP
      end
      http.start(address, port, &block)
    end

windows_platform?() click to toggle source

CAUTION Bio::Command INTERNAL USE ONLY. Users must NOT use the method. The method will be removed when it is not needed.

Checks if the program is running on Microsoft Windows. If Windows, returns true. Otherwise, returns false. Note that Cygwin is not treated as Windows.

Known issues:

- It might make a mistake in minor platforms/architectures/interpreters.

- When running JRuby on Cygwin, the result is unknown.

Returns | true or false

    # File lib/bio/command.rb, line 50
    def windows_platform?
      case RUBY_PLATFORM
      when /(?:mswin|bccwin|mingw)(?:32|64)/
        true
      when /java/
        # Reference: Redmine's platform.rb
        # http://www.redmine.org/projects/redmine/repository/revisions/1753/entry/trunk/lib/redmine/platform.rb
        if /windows/ =~ (ENV['OS'] || ENV['os']).to_s then
          true
        else
          false
        end
      else
        false
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.