Bio-WebService-LANL-SequenceLocator

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

Revision history for Bio-WebService-LANL-SequenceLocator

20170324  2017-03-24 10:26:22 PDT
    - Update example URLs pointing to indra.mullins.microbiol.washington.edu to
      use https://, thus avoiding redirect issues
    - Update LANL endpoint to use HTTPS, as required
    - Fix sequence submission to LANL and result parsing for LANL updates

20140624  2014-06-24 13:05:02 PDT
    - CSV: Include region-relative start/end positions

20140619  2014-06-19 17:39:31 PDT
    - Support FASTA input and CSV output
    - Document the status of reverse complementing (unsupported)
    - Fix invalid JSON in example results
    - Document how to install dependencies for the web API server

lib/Bio/WebService/LANL/SequenceLocator.pm  view on Meta::CPAN

        return $agent;
    },
);

has lanl_base => (
    is      => 'ro',
    lazy    => 1,
    builder => sub { 'https://www.hiv.lanl.gov' },
);

has lanl_endpoint => (
    is      => 'ro',
    lazy    => 1,
    builder => sub { shift->lanl_base . '/cgi-bin/LOCATE/locate.cgi' },
);

has _bogus_slug => (
    is      => 'ro',
    default => sub { 'BOGUS_SEQ_SO_TABULAR_FILES_ARE_LINKED_IN_OUTPUT' },
);

lib/Bio/WebService/LANL/SequenceLocator.pm  view on Meta::CPAN

    # Submit multiple sequences at once using FASTA
    my $fasta = join "\n", map {
        ("> sequence_$_", $sequences->[$_ - 1])
    } 1 .. @$sequences;

    # LANL only presents the parseable table.txt we want if there's more
    # than a single sequence.  We always add it so we can reliably skip it.
    $fasta .= "\n> " . $self->_bogus_slug . "\n";

    return $self->_request(
        POST $self->lanl_endpoint,
        Content_Type => 'form-data',
        Content      => [
            organism            => 'HIV',
            DoReverseComplement => 0,
            seq_input           => $fasta,
            (defined $args{base}
                ? ( base => $args{base} )
                : ()),
        ],
    );



( run in 0.954 second using v1.01-cache-2.11-cpan-b61123c0432 )