secret
Created

  • Download Gist
x.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720
[aaron@higgins scaffolder-annotation-locator (master)]$ git reset --hard 0fb5fb6
HEAD is now at 0fb5fb6 Merge branch 'develop'
[aaron@higgins scaffolder-annotation-locator (master)]$ rvm use 1.9.3-p0
Using /Users/aaron/.rvm/gems/ruby-1.9.3-p0
[aaron@higgins scaffolder-annotation-locator (master)]$ sed -i '' 's/~> 1.0/= 1.1.3/' Gemfile
[aaron@higgins scaffolder-annotation-locator (master)]$ bundle update
Fetching gem metadata from http://rubygems.org/......
Fetching gem metadata from http://rubygems.org/..
Using rake (0.9.2.2)
Using rack (1.4.1)
Installing bcat (0.6.2)
Installing ffi (1.0.11) with native extensions
Installing childprocess (0.3.2)
Using builder (3.0.0)
Installing diff-lcs (1.1.3)
Using json (1.7.0)
Installing gherkin (2.4.21) with native extensions
Installing term-ansicolor (1.0.7)
Installing cucumber (0.10.7)
Installing rdiscount (1.6.8) with native extensions
Installing rspec-core (2.10.0)
Installing rspec-expectations (2.10.0)
Installing rspec-mocks (2.10.0)
Installing rspec (2.10.0)
Installing aruba (0.4.5)
Installing bio (1.4.2)
Using bundler (1.1.3)
Installing git (1.2.5)
Using rdoc (3.12)
Installing jeweler (1.8.3)
Using psych (1.3.2)
Installing scaffolder (0.4.4)
Installing scaffolder-test-helpers (0.3.0)
Installing yard (0.8.1)
Your bundle is updated! Use `bundle show [gemname]` to see where a bundled gem is installed.
[aaron@higgins scaffolder-annotation-locator (master)]$ bundle exec rake
/Users/aaron/.rvm/rubies/ruby-1.9.3-p0/bin/ruby -S rspec spec/scaffolder/annotation_locator_spec.rb spec/scaffolder/gff_record_helper_spec.rb
...............F..................F..................FF..................F..............
 
Failures:
 
1) Scaffolder::AnnotationLocator relocating a single contig start trimmed with a single annotation
Failure/Error: described_class.new(@scaffold_file.path, @sequence_file.path,
Errno::ENOENT:
No such file or directory - /var/folders/yv/c2r06v597n5bdpw_bf8qcmb80000gp/T/gff20120504-25126-1nv380s
# ./lib/scaffolder/annotation_locator.rb:58:in `read'
# ./lib/scaffolder/annotation_locator.rb:58:in `records'
# ./lib/scaffolder/annotation_locator.rb:18:in `block in initialize'
# ./lib/scaffolder/annotation_locator.rb:15:in `initialize'
# ./spec/scaffolder/annotation_locator_spec.rb:7:in `new'
# ./spec/scaffolder/annotation_locator_spec.rb:7:in `relocate'
# ./spec/scaffolder/annotation_locator_spec.rb:64:in `block (4 levels) in <top (required)>'
# ./spec/scaffolder/annotation_locator_spec.rb:72:in `block (4 levels) in <top (required)>'
 
2) Scaffolder::AnnotationLocator relocating a single contig reversed with an insert before an annotation
Failure/Error: described_class.new(@scaffold_file.path, @sequence_file.path,
Errno::ENOENT:
No such file or directory - /var/folders/yv/c2r06v597n5bdpw_bf8qcmb80000gp/T/gff20120504-25126-f9ozw6
# ./lib/scaffolder/annotation_locator.rb:58:in `read'
# ./lib/scaffolder/annotation_locator.rb:58:in `records'
# ./lib/scaffolder/annotation_locator.rb:18:in `block in initialize'
# ./lib/scaffolder/annotation_locator.rb:15:in `initialize'
# ./spec/scaffolder/annotation_locator_spec.rb:7:in `new'
# ./spec/scaffolder/annotation_locator_spec.rb:7:in `relocate'
# ./spec/scaffolder/annotation_locator_spec.rb:135:in `block (4 levels) in <top (required)>'
# ./spec/scaffolder/annotation_locator_spec.rb:142:in `block (4 levels) in <top (required)>'
 
3) Scaffolder::AnnotationLocator relocating two contigs where the two annotations are unordered annotations
Failure/Error: described_class.new(@scaffold_file.path, @sequence_file.path,
Errno::ENOENT:
No such file or directory - /var/folders/yv/c2r06v597n5bdpw_bf8qcmb80000gp/T/gff20120504-25126-1nzqvio
# ./lib/scaffolder/annotation_locator.rb:58:in `read'
# ./lib/scaffolder/annotation_locator.rb:58:in `records'
# ./lib/scaffolder/annotation_locator.rb:18:in `block in initialize'
# ./lib/scaffolder/annotation_locator.rb:15:in `initialize'
# ./spec/scaffolder/annotation_locator_spec.rb:7:in `new'
# ./spec/scaffolder/annotation_locator_spec.rb:7:in `relocate'
# ./spec/scaffolder/annotation_locator_spec.rb:213:in `block (4 levels) in <top (required)>'
# ./spec/scaffolder/annotation_locator_spec.rb:225:in `block (4 levels) in <top (required)>'
 
4) Scaffolder::AnnotationLocator relocating two contigs where the first of the two contigs is start trimmed
Failure/Error: described_class.new(@scaffold_file.path, @sequence_file.path,
Errno::ENOENT:
No such file or directory - /var/folders/yv/c2r06v597n5bdpw_bf8qcmb80000gp/T/gff20120504-25126-1dkz69t
# ./lib/scaffolder/annotation_locator.rb:58:in `read'
# ./lib/scaffolder/annotation_locator.rb:58:in `records'
# ./lib/scaffolder/annotation_locator.rb:18:in `block in initialize'
# ./lib/scaffolder/annotation_locator.rb:15:in `initialize'
# ./spec/scaffolder/annotation_locator_spec.rb:7:in `new'
# ./spec/scaffolder/annotation_locator_spec.rb:7:in `relocate'
# ./spec/scaffolder/annotation_locator_spec.rb:235:in `block (4 levels) in <top (required)>'
# ./spec/scaffolder/annotation_locator_spec.rb:238:in `block (4 levels) in <top (required)>'
 
5) Scaffolder::AnnotationLocator relocating two contigs separated by an unresolved region
Failure/Error: described_class.new(@scaffold_file.path, @sequence_file.path,
Errno::ENOENT:
No such file or directory - /var/folders/yv/c2r06v597n5bdpw_bf8qcmb80000gp/T/gff20120504-25126-d5issp
# ./lib/scaffolder/annotation_locator.rb:58:in `read'
# ./lib/scaffolder/annotation_locator.rb:58:in `records'
# ./lib/scaffolder/annotation_locator.rb:18:in `block in initialize'
# ./lib/scaffolder/annotation_locator.rb:15:in `initialize'
# ./spec/scaffolder/annotation_locator_spec.rb:7:in `new'
# ./spec/scaffolder/annotation_locator_spec.rb:7:in `relocate'
# ./spec/scaffolder/annotation_locator_spec.rb:282:in `block (4 levels) in <top (required)>'
# ./spec/scaffolder/annotation_locator_spec.rb:292:in `block (4 levels) in <top (required)>'
 
Finished in 2.09 seconds
88 examples, 5 failures
 
Failed examples:
 
rspec ./spec/scaffolder/annotation_locator_spec.rb:72 # Scaffolder::AnnotationLocator relocating a single contig start trimmed with a single annotation
rspec ./spec/scaffolder/annotation_locator_spec.rb:142 # Scaffolder::AnnotationLocator relocating a single contig reversed with an insert before an annotation
rspec ./spec/scaffolder/annotation_locator_spec.rb:225 # Scaffolder::AnnotationLocator relocating two contigs where the two annotations are unordered annotations
rspec ./spec/scaffolder/annotation_locator_spec.rb:238 # Scaffolder::AnnotationLocator relocating two contigs where the first of the two contigs is start trimmed
rspec ./spec/scaffolder/annotation_locator_spec.rb:292 # Scaffolder::AnnotationLocator relocating two contigs separated by an unresolved region
rake aborted!
/Users/aaron/.rvm/rubies/ruby-1.9.3-p0/bin/ruby -S rspec spec/scaffolder/annotation_locator_spec.rb spec/scaffolder/gff_record_helper_spec.rb failed
 
Tasks: TOP => default => spec
(See full trace by running task with --trace)
[aaron@higgins scaffolder-annotation-locator (master)]$ bundle exec rake features
/Users/aaron/.rvm/rubies/ruby-1.9.3-p0/bin/ruby -S bundle exec cucumber
Feature: Parsing contigs with inserts
In order to include inserts in a scaffold
A user can use scaffold-annotation-locator
to update annotation coordinates with respect to contigs with inserts
 
Scenario: An annotation before an insert in a contig # features/inserts.feature:6
Given a file named "scaf.yml" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
---
- sequence:
source: contig1
inserts:
-
source: insert1
open: 14
close: 15
"""
Given a file named "seq.fna" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
> contig1
AAAAAGGGGGCCCCCTTTTT
> insert1
TTTT
"""
Given a file named "anno.gff" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
##gff-version 3
contig1 . CDS 4 13 . + 1 ID=gene1
"""
When I relocate the annotations using "scaf.yml", "seq.fna" and "anno.gff" # features/step_definitions/scaffolder-annotation-locator_steps.rb:1
Then the result should be: # features/step_definitions/scaffolder-annotation-locator_steps.rb:11
"""
##gff-version 3
scaffold . CDS 4 13 . + 1 ID=gene1
"""
 
Scenario: An annotation after an insert in a contig # features/inserts.feature:37
Given a file named "scaf.yml" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
---
- sequence:
source: contig1
inserts:
-
source: insert1
open: 1
close: 3
"""
Given a file named "seq.fna" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
> contig1
AAAAAGGGGGCCCCCTTTTT
> insert1
TTTT
"""
Given a file named "anno.gff" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
##gff-version 3
contig1 . CDS 4 13 . + 1 ID=gene1
"""
When I relocate the annotations using "scaf.yml", "seq.fna" and "anno.gff" # features/step_definitions/scaffolder-annotation-locator_steps.rb:1
Then the result should be: # features/step_definitions/scaffolder-annotation-locator_steps.rb:11
"""
##gff-version 3
scaffold . CDS 5 14 . + 1 ID=gene1
"""
 
Scenario: An annotation before an insert in a reversed contig # features/inserts.feature:68
Given a file named "scaf.yml" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
---
- sequence:
source: contig1
reverse: true
inserts:
-
source: insert1
open: 1
close: 3
"""
Given a file named "seq.fna" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
> contig1
AAAAAGGGGGCCCCCTTTTT
> insert1
TTTT
"""
Given a file named "anno.gff" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
##gff-version 3
contig1 . CDS 4 13 . + 1 ID=gene1
"""
When I relocate the annotations using "scaf.yml", "seq.fna" and "anno.gff" # features/step_definitions/scaffolder-annotation-locator_steps.rb:1
Then the result should be: # features/step_definitions/scaffolder-annotation-locator_steps.rb:11
"""
##gff-version 3
scaffold . CDS 8 17 . - 1 ID=gene1
"""
 
Scenario: An annotation overlapping with an insert location # features/inserts.feature:100
Given a file named "scaf.yml" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
---
- sequence:
source: contig1
inserts:
-
source: insert1
open: 1
close: 4
"""
Given a file named "seq.fna" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
> contig1
AAAAAGGGGGCCCCCTTTTT
> insert1
TTTT
"""
Given a file named "anno.gff" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
##gff-version 3
contig1 . CDS 4 13 . + 1 ID=gene1
"""
When I relocate the annotations using "scaf.yml", "seq.fna" and "anno.gff" # features/step_definitions/scaffolder-annotation-locator_steps.rb:1
Then the result should be: # features/step_definitions/scaffolder-annotation-locator_steps.rb:11
"""
##gff-version 3
"""
 
Feature: Locating annotations on single contig scaffold
In order to build a genome from multiple contigs
A user can use scaffold-annotation-locator
to update annotation coordinates with respect from multiple contigs
 
Scenario: Three annotations on three contigs # features/multiple-contigs.feature:6
Given a file named "scaf.yml" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
---
- sequence:
source: contig1
- sequence:
source: contig2
- sequence:
source: contig3
"""
Given a file named "seq.fna" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
> contig1
AAAAAGGGGGCCCCCTTTTT
> contig2
AAAAAGGGGGCCCCCTTTTT
> contig3
AAAAAGGGGGCCCCCTTTTT
"""
Given a file named "anno.gff" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
##gff-version 3
contig1 . CDS 1 10 . + 1 ID=gene1
contig2 . CDS 1 6 . + 1 ID=gene2
contig3 . CDS 1 6 . + 1 ID=gene2
"""
When I relocate the annotations using "scaf.yml", "seq.fna" and "anno.gff" # features/step_definitions/scaffolder-annotation-locator_steps.rb:1
Then the result should be: # features/step_definitions/scaffolder-annotation-locator_steps.rb:11
"""
##gff-version 3
scaffold . CDS 1 10 . + 1 ID=gene1
scaffold . CDS 21 26 . + 1 ID=gene2
scaffold . CDS 41 46 . + 1 ID=gene2
"""
 
Scenario: Unordered Annotations on multiple contigs # features/multiple-contigs.feature:42
Given a file named "scaf.yml" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
---
- sequence:
source: contig1
- sequence:
source: contig2
"""
Given a file named "seq.fna" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
> contig1
AAAAAGGGGGCCCCCTTTTT
> contig2
AAAAAGGGGGCCCCCTTTTT
"""
Given a file named "anno.gff" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
##gff-version 3
contig2 . CDS 1 6 . + 1 ID=gene2
contig1 . CDS 1 10 . + 1 ID=gene1
"""
When I relocate the annotations using "scaf.yml", "seq.fna" and "anno.gff" # features/step_definitions/scaffolder-annotation-locator_steps.rb:1
Then the result should be: # features/step_definitions/scaffolder-annotation-locator_steps.rb:11
"""
##gff-version 3
scaffold . CDS 1 10 . + 1 ID=gene1
scaffold . CDS 21 26 . + 1 ID=gene2
"""
 
Scenario: Annotations on trimmed contigs # features/multiple-contigs.feature:72
Given a file named "scaf.yml" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
---
- sequence:
source: contig1
stop: 17
- sequence:
source: contig2
start: 4
stop: 9
- sequence:
source: contig3
"""
Given a file named "seq.fna" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
> contig1
AAAAAGGGGGCCCCCTTTTT
> contig2
AAAAAGGGGGCCCCCTTTTT
> contig3
AAAAAGGGGGCCCCCTTTTT
"""
Given a file named "anno.gff" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
##gff-version 3
contig1 . CDS 1 10 . + 1 ID=gene1
contig2 . CDS 4 6 . + 1 ID=gene2
contig3 . CDS 1 6 . + 1 ID=gene3
"""
When I relocate the annotations using "scaf.yml", "seq.fna" and "anno.gff" # features/step_definitions/scaffolder-annotation-locator_steps.rb:1
Then the result should be: # features/step_definitions/scaffolder-annotation-locator_steps.rb:11
"""
##gff-version 3
scaffold . CDS 1 10 . + 1 ID=gene1
scaffold . CDS 18 20 . + 1 ID=gene2
scaffold . CDS 24 29 . + 1 ID=gene3
"""
 
Scenario: Annotations on reversed and trimmed contigs # features/multiple-contigs.feature:111
Given a file named "scaf.yml" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
---
- sequence:
source: contig1
stop: 17
- sequence:
source: contig2
start: 4
stop: 9
reverse: true
- sequence:
source: contig3
reverse: true
"""
Given a file named "seq.fna" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
> contig1
AAAAAGGGGGCCCCCTTTTT
> contig2
AAAAAGGGGGCCCCCTTTTT
> contig3
AAAAAGGGGGCCCCCTTTTT
"""
Given a file named "anno.gff" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
##gff-version 3
contig1 . CDS 1 10 . + 1 ID=gene1
contig2 . CDS 4 6 . + 1 ID=gene2
contig3 . CDS 1 6 . + 1 ID=gene3
"""
When I relocate the annotations using "scaf.yml", "seq.fna" and "anno.gff" # features/step_definitions/scaffolder-annotation-locator_steps.rb:1
Then the result should be: # features/step_definitions/scaffolder-annotation-locator_steps.rb:11
"""
##gff-version 3
scaffold . CDS 1 10 . + 1 ID=gene1
scaffold . CDS 21 23 . - 1 ID=gene2
scaffold . CDS 38 43 . - 1 ID=gene3
"""
 
Scenario: Annotations on two contigs separated by an unannotated contig # features/multiple-contigs.feature:152
Given a file named "scaf.yml" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
---
- sequence:
source: contig1
- sequence:
source: contig2
- sequence:
source: contig3
"""
Given a file named "seq.fna" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
> contig1
AAAAAGGGGGCCCCCTTTTT
> contig2
AAAAAGGGGGCCCCCTTTTT
> contig3
AAAAAGGGGGCCCCCTTTTT
"""
Given a file named "anno.gff" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
##gff-version 3
contig1 . CDS 1 6 . + 1 ID=gene1
contig3 . CDS 1 6 . + 1 ID=gene2
"""
When I relocate the annotations using "scaf.yml", "seq.fna" and "anno.gff" # features/step_definitions/scaffolder-annotation-locator_steps.rb:1
Then the result should be: # features/step_definitions/scaffolder-annotation-locator_steps.rb:11
"""
##gff-version 3
scaffold . CDS 1 6 . + 1 ID=gene1
scaffold . CDS 41 46 . + 1 ID=gene2
"""
 
Scenario: Annotations on a single duplicated contig # features/multiple-contigs.feature:186
Given a file named "scaf.yml" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
---
- sequence:
source: contig1
- sequence:
source: contig1
"""
Given a file named "seq.fna" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
> contig1
AAAAAGGGGGCCCCCTTTTT
"""
Given a file named "anno.gff" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
##gff-version 3
contig1 . CDS 1 6 . + 1 ID=gene1
"""
When I relocate the annotations using "scaf.yml", "seq.fna" and "anno.gff" # features/step_definitions/scaffolder-annotation-locator_steps.rb:1
Then the result should be: # features/step_definitions/scaffolder-annotation-locator_steps.rb:11
"""
##gff-version 3
scaffold . CDS 1 6 . + 1 ID=gene1
scaffold . CDS 21 26 . + 1 ID=gene1
"""
 
Scenario: Annotations on reversed and trimmed contigs with inserts # features/multiple-contigs.feature:213
Given a file named "scaf.yml" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
---
- sequence:
source: contig1
stop: 6
- sequence:
source: contig2
reverse: true
inserts:
-
source: insert1
open: 6
close: 7
- sequence:
source: contig3
start: 3
 
"""
Given a file named "seq.fna" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
> contig1
AAAAAGGG
> contig2
AAAAAGGGGGC
> contig3
AAAAAGGG
> insert1
TTT
"""
Given a file named "anno.gff" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
##gff-version 3
contig1 . CDS 1 4 . + 1 ID=gene1
contig1 . CDS 5 8 . + 1 ID=gene2
contig2 . CDS 1 4 . + 1 ID=gene3
contig2 . CDS 8 11 . + 1 ID=gene4
contig3 . CDS 1 3 . + 1 ID=gene5
contig3 . CDS 4 8 . + 1 ID=gene6
"""
When I relocate the annotations using "scaf.yml", "seq.fna" and "anno.gff" # features/step_definitions/scaffolder-annotation-locator_steps.rb:1
Then the result should be: # features/step_definitions/scaffolder-annotation-locator_steps.rb:11
"""
##gff-version 3
scaffold . CDS 1 4 . + 1 ID=gene1
scaffold . CDS 15 18 . - 1 ID=gene3
scaffold . CDS 7 10 . - 1 ID=gene4
scaffold . CDS 20 24 . + 1 ID=gene6
"""
 
Feature: Locating annotations on single contig scaffold
In order to add gff3 annotations to a scaffold
A user can use scaffold-annotation-locator
to return the updated coordinates of scaffold annotations
 
Scenario: One annotation on a contig # features/single-contig.feature:6
Given a file named "scaf.yml" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
---
- sequence:
source: contig1
"""
Given a file named "seq.fna" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
> contig1
AAAAAGGGGGCCCCCTTTTT
"""
Given a file named "anno.gff" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
##gff-version 3
contig1 . CDS 4 13 . + 1 ID=gene1
"""
When I relocate the annotations using "scaf.yml", "seq.fna" and "anno.gff" # features/step_definitions/scaffolder-annotation-locator_steps.rb:1
Then the result should be: # features/step_definitions/scaffolder-annotation-locator_steps.rb:11
"""
##gff-version 3
scaffold . CDS 4 13 . + 1 ID=gene1
"""
 
Scenario: One annotation on a reversed contig # features/single-contig.feature:30
Given a file named "scaf.yml" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
---
- sequence:
source: contig1
reverse: true
"""
Given a file named "seq.fna" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
> contig1
AAAAAGGGGGCCCCCTTTTT
"""
Given a file named "anno.gff" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
##gff-version 3
contig1 . CDS 1 6 . + 1 ID=gene1
"""
When I relocate the annotations using "scaf.yml", "seq.fna" and "anno.gff" # features/step_definitions/scaffolder-annotation-locator_steps.rb:1
Then the result should be: # features/step_definitions/scaffolder-annotation-locator_steps.rb:11
"""
##gff-version 3
scaffold . CDS 15 20 . - 1 ID=gene1
"""
 
Scenario: An annotation in a start trimmed region of the sequence # features/single-contig.feature:55
Given a file named "scaf.yml" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
---
- sequence:
source: contig1
start: 5
"""
Given a file named "seq.fna" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
> contig1
AAAAAGGGGGCCCCCTTTTT
> insert1
TTTT
"""
Given a file named "anno.gff" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
##gff-version 3
contig1 . CDS 4 13 . + 1 ID=gene1
"""
When I relocate the annotations using "scaf.yml", "seq.fna" and "anno.gff" # features/step_definitions/scaffolder-annotation-locator_steps.rb:1
Then the result should be: # features/step_definitions/scaffolder-annotation-locator_steps.rb:11
"""
##gff-version 3
"""
 
Scenario: An annotation inside a stop trimmed region of the sequence # features/single-contig.feature:81
Given a file named "scaf.yml" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
---
- sequence:
source: contig1
stop: 12
"""
Given a file named "seq.fna" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
> contig1
AAAAAGGGGGCCCCCTTTTT
> insert1
TTTT
"""
Given a file named "anno.gff" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
##gff-version 3
contig1 . CDS 4 13 . + 1 ID=gene1
"""
When I relocate the annotations using "scaf.yml", "seq.fna" and "anno.gff" # features/step_definitions/scaffolder-annotation-locator_steps.rb:1
Then the result should be: # features/step_definitions/scaffolder-annotation-locator_steps.rb:11
"""
##gff-version 3
"""
 
Scenario: An annotation bordering a stop trimmed region of the sequence # features/single-contig.feature:107
Given a file named "scaf.yml" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
---
- sequence:
source: contig1
stop: 13
"""
Given a file named "seq.fna" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
> contig1
AAAAAGGGGGCCCCCTTTTT
> insert1
TTTT
"""
Given a file named "anno.gff" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
##gff-version 3
contig1 . CDS 4 13 . + 1 ID=gene1
"""
When I relocate the annotations using "scaf.yml", "seq.fna" and "anno.gff" # features/step_definitions/scaffolder-annotation-locator_steps.rb:1
Then the result should be: # features/step_definitions/scaffolder-annotation-locator_steps.rb:11
"""
##gff-version 3
scaffold . CDS 4 13 . + 1 ID=gene1
"""
 
Scenario: An annotation bordering a start trimmed region of the sequence # features/single-contig.feature:134
Given a file named "scaf.yml" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
---
- sequence:
source: contig1
start: 4
"""
Given a file named "seq.fna" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
> contig1
AAAAAGGGGGCCCCCTTTTT
"""
Given a file named "anno.gff" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
##gff-version 3
contig1 . CDS 4 13 . + 1 ID=gene1
"""
When I relocate the annotations using "scaf.yml", "seq.fna" and "anno.gff" # features/step_definitions/scaffolder-annotation-locator_steps.rb:1
Then the result should be: # features/step_definitions/scaffolder-annotation-locator_steps.rb:11
"""
##gff-version 3
scaffold . CDS 1 10 . + 1 ID=gene1
"""
 
Feature: Parsing unresolved regions
In order to include unresolved regions in a scaffold
A user can use scaffold-annotation-locator
to update annotation coordinates with respect to unresolved regions
 
Scenario: Annotations on two contigs separated by an unresolved region # features/unresolved.feature:6
Given a file named "scaf.yml" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
---
- sequence:
source: contig1
- unresolved:
length: 10
- sequence:
source: contig2
"""
Given a file named "seq.fna" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
> contig1
AAAAAGGGGGCCCCCTTTTT
> contig2
AAAAAGGGGGCCCCCTTTTT
"""
Given a file named "anno.gff" with: # aruba-0.4.5/lib/aruba/cucumber.rb:15
"""
##gff-version 3
contig1 . CDS 1 6 . + 1 ID=gene1
contig2 . CDS 1 6 . + 1 ID=gene2
"""
When I relocate the annotations using "scaf.yml", "seq.fna" and "anno.gff" # features/step_definitions/scaffolder-annotation-locator_steps.rb:1
Then the result should be: # features/step_definitions/scaffolder-annotation-locator_steps.rb:11
"""
##gff-version 3
scaffold . CDS 1 6 . + 1 ID=gene1
scaffold . CDS 31 36 . + 1 ID=gene2
"""
 
18 scenarios (18 passed)
90 steps (90 passed)
0m0.974s
[aaron@higgins scaffolder-annotation-locator (master)]$ ruby -v
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin11.3.0]
[aaron@higgins scaffolder-annotation-locator (master)]$ bundle -v
Bundler version 1.1.3
[aaron@higgins scaffolder-annotation-locator (master)]$ ruby -v
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin11.3.0]
[aaron@higgins scaffolder-annotation-locator (master)]$

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.