Bio-WebService-LANL-SequenceLocator
view release on metacpan or search on metacpan
return error(406 => "format '$format' is not supported; try one of " . join(", ", @{$self->formats}))
unless grep { $format eq $_ } @{$self->formats};
sub (%fasta=) {
my ($self, $fasta) = @_;
return $self->locate_sequences_from_fasta($fasta, $base, $format);
},
sub (*fasta=) {
my ($self, $fasta) = @_;
return error(422 => $fasta->reason)
unless $fasta->is_upload;
return $self->locate_sequences_from_fasta(path($fasta->path)->slurp, $base, $format);
},
sub (%@sequence~) {
my ($self, $sequences) = @_;
return $self->locate_sequences($sequences, $base, $format);
},
},
},
sub (GET + /within/hiv) {
error( 405 => "You must make location requests using POST." )
lib/Bio/WebService/LANL/SequenceLocator/Server.pm view on Meta::CPAN
return error(406 => "format '$format' is not supported; try one of " . join(", ", @{$self->formats}))
unless grep { $format eq $_ } @{$self->formats};
sub (%fasta=) {
my ($self, $fasta) = @_;
return $self->locate_sequences_from_fasta($fasta, $base, $format);
},
sub (*fasta=) {
my ($self, $fasta) = @_;
return error(422 => $fasta->reason)
unless $fasta->is_upload;
return $self->locate_sequences_from_fasta(path($fasta->path)->slurp, $base, $format);
},
sub (%@sequence~) {
my ($self, $sequences) = @_;
return $self->locate_sequences($sequences, $base, $format);
},
},
},
sub (GET + /within/hiv) {
error( 405 => "You must make location requests using POST." )
share/about.html view on Meta::CPAN
this API. Get in touch if you need something that's
missing!
</p>
<h2>Endpoint</h2>
<h3><code>POST .../within/hiv</code></h3>
<p>
Requires one or more values for the POST parameter
<code>sequence</code> <em>or</em> a single-valued
<code>fasta</code> parameter as a URL-encoded string or
file upload of <a href="https://en.wikipedia.org/wiki/FASTA">FASTA</a>-formatted
sequences.
</p>
<p>
Both protein and nucleotide
sequences are accepted, although the data returned varies
by type due to what LANL returns. See the
<a href="#curl">curl example</a> which queries a protein
sequence and the same sequence as nucleotides. If you use
LANL's tool directly, the reverse complements of your
sequences will also be attempted and the best matching
share/about.html view on Meta::CPAN
<h2>Quick lookup</h2>
<p>
Submit sequences as a FASTA file and download the location
results as a CSV file. Note that the CSV does not contain
all of the information the API can provide since CSV does
not have standard support for nested or multi-valued data
structures. This form uses the API described above.
</p>
<form action="within/hiv" method="POST" enctype="multipart/form-data" role="form" class="form-inline">
<div class="form-group">
<label for="fasta-upload">FASTA file</label>
<input type="file" id="fasta-upload" name="fasta" style="width: 15em"></label>
</div>
<div class="form-group">
<label><input type="radio" name="base" value="nuc"> Nucleotides</label><br>
<label><input type="radio" name="base" value="aa"> Amino acids</label>
</div>
<input type="hidden" name="format" value="csv">
<button type="submit" class="btn btn-default">Submit</button>
</form>
<hr>
( run in 2.482 seconds using v1.01-cache-2.11-cpan-b16cb0d3907 )