Skip to content

Commit 1b9c246

Browse files
foisysandreasprlic
authored andcommitted
/* Working with locations */
1 parent 1ba1122 commit 1b9c246

2 files changed

Lines changed: 35 additions & 26 deletions

File tree

wiki/BioJava:BioJavaXDocs.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1420,36 +1420,36 @@ implemented by the SimpleRichLocation class.
14201420

14211421
This example describes the GenBank-style location string "56":
14221422

1423-
<java> Position pos = new SimplePosition(56); RichLocation loc = new
1424-
SimpleRichLocation(pos,0); // the 0 is an arbitrary value for the rank
1425-
of this location </java>
1423+
<java> Position pos = new SimplePosition(56); // the 0 is an arbitrary
1424+
value for the rank of this location RichLocation loc = new
1425+
SimpleRichLocation(pos,0); </java>
14261426

14271427
This example describes the GenBank-style location string
14281428
"(23^34)..57\>":
14291429

1430-
<java> Position min = new SimplePosition(false,false,23,34,"^"); // two
1431-
falses = not fuzzy at all Position max = new
1432-
SimplePosition(false,true,57); // false = non-fuzzy start, true = fuzzy
1433-
end RichLocation loc = new SimpleRichLocation(min,max,0); // the 0 is an
1434-
arbitrary value for the rank of this location </java>
1430+
<java> // two falses = not fuzzy at all Position min = new
1431+
SimplePosition(false,false,23,34,"^"); // false = non-fuzzy start, true
1432+
= fuzzy end Position max = new SimplePosition(false,true,57); // the 0
1433+
is an arbitrary value for the rank of this location RichLocation loc =
1434+
new SimpleRichLocation(min,max,0); </java>
14351435

14361436
This example describes the GenBank-style location string
14371437
"complement((23^34)..57\>)":
14381438

1439-
<java> Position min = new SimplePosition(false,false,23,34,"^"); // two
1440-
falses = not fuzzy at all Position max = new
1441-
SimplePosition(false,true,57); // false = non-fuzzy start, true = fuzzy
1442-
end RichLocation loc = new
1439+
<java> // two falses = not fuzzy at all Position min = new
1440+
SimplePosition(false,false,23,34,"^"); // false = non-fuzzy start, true
1441+
= fuzzy end Position max = new SimplePosition(false,true,57);
1442+
RichLocation loc = new
14431443
SimpleRichLocation(min,max,0,Strand.NEGATIVE\_STRAND); </java>
14441444

14451445
This example describes the GenBank-style location string
14461446
"A12345.3:complement((23^34)..57\>)":
14471447

1448-
<java> CrossRef cr = new SimpleCrossRef("GenBank","A12345",3); //
1449-
version 3 of accession A12345 in the GenBank database Position min = new
1450-
SimplePosition(false,false,23,34,"^"); // two falses = not fuzzy at all
1451-
Position max = new SimplePosition(false,true,57); // false = non-fuzzy
1452-
start, true = fuzzy end RichLocation loc = new
1448+
<java> // version 3 of accession A12345 in the GenBank database CrossRef
1449+
cr = new SimpleCrossRef("GenBank","A12345",3); // two falses = not fuzzy
1450+
at all Position min = new SimplePosition(false,false,23,34,"^"); //
1451+
false = non-fuzzy start, true = fuzzy end Position max = new
1452+
SimplePosition(false,true,57); RichLocation loc = new
14531453
SimpleRichLocation(min,max,Strand.NEGATIVE\_STRAND,cr); </java>
14541454

14551455
If you require locations that cover more than one range, you must use

wiki/BioJava:BioJavaXDocs.mediawiki

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1490,31 +1490,40 @@ This example describes the GenBank-style location string "56":
14901490

14911491
<java>
14921492
Position pos = new SimplePosition(56);
1493-
RichLocation loc = new SimpleRichLocation(pos,0); // the 0 is an arbitrary value for the rank of this location
1493+
// the 0 is an arbitrary value for the rank of this location
1494+
RichLocation loc = new SimpleRichLocation(pos,0);
14941495
</java>
14951496

14961497
This example describes the GenBank-style location string "(23^34)..57>":
14971498

14981499
<java>
1499-
Position min = new SimplePosition(false,false,23,34,"^"); // two falses = not fuzzy at all
1500-
Position max = new SimplePosition(false,true,57); // false = non-fuzzy start, true = fuzzy end
1501-
RichLocation loc = new SimpleRichLocation(min,max,0); // the 0 is an arbitrary value for the rank of this location
1500+
// two falses = not fuzzy at all
1501+
Position min = new SimplePosition(false,false,23,34,"^");
1502+
// false = non-fuzzy start, true = fuzzy end
1503+
Position max = new SimplePosition(false,true,57);
1504+
// the 0 is an arbitrary value for the rank of this location
1505+
RichLocation loc = new SimpleRichLocation(min,max,0);
15021506
</java>
15031507

15041508
This example describes the GenBank-style location string "complement((23^34)..57>)":
15051509

15061510
<java>
1507-
Position min = new SimplePosition(false,false,23,34,"^"); // two falses = not fuzzy at all
1508-
Position max = new SimplePosition(false,true,57); // false = non-fuzzy start, true = fuzzy end
1511+
// two falses = not fuzzy at all
1512+
Position min = new SimplePosition(false,false,23,34,"^");
1513+
// false = non-fuzzy start, true = fuzzy end
1514+
Position max = new SimplePosition(false,true,57);
15091515
RichLocation loc = new SimpleRichLocation(min,max,0,Strand.NEGATIVE_STRAND);
15101516
</java>
15111517

15121518
This example describes the GenBank-style location string "A12345.3:complement((23^34)..57>)":
15131519

15141520
<java>
1515-
CrossRef cr = new SimpleCrossRef("GenBank","A12345",3); // version 3 of accession A12345 in the GenBank database
1516-
Position min = new SimplePosition(false,false,23,34,"^"); // two falses = not fuzzy at all
1517-
Position max = new SimplePosition(false,true,57); // false = non-fuzzy start, true = fuzzy end
1521+
// version 3 of accession A12345 in the GenBank database
1522+
CrossRef cr = new SimpleCrossRef("GenBank","A12345",3);
1523+
// two falses = not fuzzy at all
1524+
Position min = new SimplePosition(false,false,23,34,"^");
1525+
// false = non-fuzzy start, true = fuzzy end
1526+
Position max = new SimplePosition(false,true,57);
15181527
RichLocation loc = new SimpleRichLocation(min,max,Strand.NEGATIVE_STRAND,cr);
15191528
</java>
15201529

0 commit comments

Comments
 (0)