| 1 | package App::Egaz::Command::formats; | ||||||||||
| 2 | 19 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 19 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 19 | ▶ | use autodie; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 19 | ▶ | use App::Egaz -command; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 19 | ▶ | use App::Egaz::Common; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 2 | ▶ | sub abstract { | ||||||||
|
Subroutine
abstract: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 10 | 2 | return 'formats of files use in this project'; | |||||||||
| 11 | } | ||||||||||
| 12 | |||||||||||
| 13 | 2 | ▶ | sub opt_spec { | ||||||||
|
Subroutine
opt_spec: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 14 | 2 | return ( [ "outfile|o=s", "Output filename. [stdout] for screen", { default => "stdout" }, ], | |||||||||
| 15 | { show_defaults => 1, } ); | ||||||||||
| 16 | } | ||||||||||
| 17 | |||||||||||
| 18 | 2 | ▶ | sub usage_desc { | ||||||||
|
Subroutine
usage_desc: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 19 | 2 | return "egaz formats"; | |||||||||
| 20 | } | ||||||||||
| 21 | |||||||||||
| 22 | 1 | ▶ | sub description { | ||||||||
|
Subroutine
description: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 23 | 1 | my $desc; | |||||||||
| 24 | 1 | $desc .= ucfirst(abstract) . ".\n"; | |||||||||
| 25 | |||||||||||
| 26 | 1 | return $desc; | |||||||||
| 27 | } | ||||||||||
| 28 | |||||||||||
| 29 | 1 | ▶ | sub execute { | ||||||||
|
Subroutine
execute: called CC=2 SCAR=7.1
Pod
documented
| |||||||||||
| 30 | 1 | my ( $self, $opt, $args ) = @_; | |||||||||
| 31 | |||||||||||
| 32 | 1 | my $out_fh; | |||||||||
| 33 | 1 | ▶ | if ( lc( $opt->{outfile} ) eq "stdout" ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 34 | 1 | $out_fh = *STDOUT{IO}; | |||||||||
| 35 | } | ||||||||||
| 36 | else { | ||||||||||
| 37 | 0 | open $out_fh, ">", $opt->{outfile}; | |||||||||
| 38 | } | ||||||||||
| 39 | |||||||||||
| 40 | 1 | my $desc .= <<MARKDOWN; | |||||||||
| 41 | |||||||||||
| 42 | * [lav format](http://www.bx.psu.edu/miller_lab/dist/lav_format.html) | ||||||||||
| 43 | |||||||||||
| 44 | Here <start> and <stop> are origin 1 (i.e. the first base in the original | ||||||||||
| 45 | given sequence is called '1') and inclusive (both endpoints are included | ||||||||||
| 46 | in the interval). | ||||||||||
| 47 | |||||||||||
| 48 | * [psl format](https://genome.ucsc.edu/FAQ/FAQformat.html#format2) | ||||||||||
| 49 | |||||||||||
| 50 | Be aware that the coordinates for a negative strand in a PSL line are | ||||||||||
| 51 | handled in a special way. In the qStart and qEnd fields, the coordinates | ||||||||||
| 52 | indicate the position where the query matches from the point of view of | ||||||||||
| 53 | the forward strand, even when the match is on the reverse strand. | ||||||||||
| 54 | However, in the qStarts list, the coordinates are reversed. | ||||||||||
| 55 | |||||||||||
| 56 | Each psl lines contain 21 fields: | ||||||||||
| 57 | |||||||||||
| 58 | matches misMatches repMatches nCount | ||||||||||
| 59 | qNumInsert qBaseInsert tNumInsert tBaseInsert | ||||||||||
| 60 | strand | ||||||||||
| 61 | qName qSize qStart qEnd | ||||||||||
| 62 | tName tSize tStart tEnd | ||||||||||
| 63 | blockCount blockSizes qStarts tStarts | ||||||||||
| 64 | |||||||||||
| 65 | * [axt format](https://genome.ucsc.edu/goldenPath/help/axt.html) | ||||||||||
| 66 | |||||||||||
| 67 | If the strand value is '-', the values of the aligning organism's start | ||||||||||
| 68 | and end fields are relative to the reverse-complemented coordinates of | ||||||||||
| 69 | its chromosome. | ||||||||||
| 70 | |||||||||||
| 71 | * [maf format](https://genome.ucsc.edu/FAQ/FAQformat.html#format5) | ||||||||||
| 72 | |||||||||||
| 73 | The "s" lines together with the "a" lines define a multiple alignment. | ||||||||||
| 74 | |||||||||||
| 75 | * start -- is a zero-based number. If the strand field is "-" then this is | ||||||||||
| 76 | the start relative to the reverse-complemented source sequence. | ||||||||||
| 77 | |||||||||||
| 78 | * [chain format](https://genome.ucsc.edu/goldenPath/help/chain.html) | ||||||||||
| 79 | |||||||||||
| 80 | * [net format](https://genome.ucsc.edu/goldenPath/help/net.html) | ||||||||||
| 81 | |||||||||||
| 82 | MARKDOWN | ||||||||||
| 83 | |||||||||||
| 84 | 1 | print {$out_fh} $desc; | |||||||||
| 85 | |||||||||||
| 86 | 1 | return; | |||||||||
| 87 | } | ||||||||||
| 88 | |||||||||||
| 89 | 19 | 1; | |||||||||