Skip to content

Commit a61fb75

Browse files
committed
Added moved note and cleaned up unused variable and some docs
1 parent 4f2ab4a commit a61fb75

File tree

2 files changed

+53
-40
lines changed

2 files changed

+53
-40
lines changed

biojava-genome/src/main/java/org/biojava/nbio/genome/io/fastq/package-info.java

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
/**
2323
* FASTQ and variants sequence format I/O.
2424
*
25-
* <br><br>
25+
* <p>
2626
* To read from an Illumina variant FASTQ sequence file:
2727
* <pre>
2828
* FastqReader reader = new IlluminaFastqReader();
@@ -32,7 +32,7 @@
3232
* }
3333
* </pre>
3434
*
35-
* To write to an Sanger variant FASTQ sequence file:
35+
* To write to a Sanger variant FASTQ sequence file:
3636
* <pre>
3737
* Collection&lt;Fastq&gt; fastq = ...;
3838
* SangerFastqWriter writer = new SangerFastqWriter();
@@ -43,13 +43,19 @@
4343
* its variants, and how they are handled in O|B|F projects,
4444
* see:
4545
*
46-
* <br><br>
46+
* <p>
47+
*
4748
* <a href="http://dx.doi.org/10.1093/nar/gkp1137">The Sanger FASTQ file format for sequences
48-
* with quality scores, and the Solexa/Illumina FASTQ variants</a><br>
49+
* with quality scores, and the Solexa/Illumina FASTQ variants</a>
50+
* <p>
4951
* Peter J. A. Cock (Biopython), Christopher J. Fields (BioPerl), Naohisa Goto (BioRuby),
5052
* Michael L. Heuer (BioJava) and Peter M. Rice (EMBOSS).<br>
5153
* Nucleic Acids Research, <a href="http://dx.doi.org/10.1093/nar/gkp1137">doi:10.1093/nar/gkp1137</a>
5254
*
55+
* <p>
56+
* Moved from org.biojava.nbio.sequencing (biojava-sequencing module) in 5.0.0
57+
*
5358
* @since 3.0.3
59+
*
5460
*/
5561
package org.biojava.nbio.genome.io.fastq;

biojava-genome/src/main/java/org/biojava/nbio/genome/util/ChromosomeMappingTools.java

Lines changed: 43 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ public static void setCoordinateSystem(int baseInt) {
3434
base = baseInt;
3535
}
3636

37-
/** Pretty print the details of a GeneChromosomePosition to a String
37+
/**
38+
* Pretty print the details of a GeneChromosomePosition to a String
3839
*
3940
* @param chromosomePosition
4041
* @return
@@ -203,7 +204,7 @@ public static int getCDSLength(GeneChromosomePosition chromPos) {
203204
}
204205

205206
/**
206-
* maps the position of a CDS nucleotide back to the genome
207+
* Maps the position of a CDS nucleotide back to the genome
207208
*
208209
* @param cdsNucleotidePosition
209210
* @return a ChromPos object
@@ -234,7 +235,8 @@ public static ChromPos getChromosomePosForCDScoordinate(int cdsNucleotidePositio
234235

235236
}
236237

237-
/** returns a nicely formatted representation of the position
238+
/**
239+
* Returns a nicely formatted representation of the position
238240
*
239241
* @param chromosomePosition
240242
* @return
@@ -546,7 +548,8 @@ public static int getCDSLengthForward(List<Integer> exonStarts, List<Integer> ex
546548
return codingLength - 3;
547549
}
548550

549-
/** Extracts the exon boundaries in CDS coordinates. (needs to be divided by 3 to get AA positions)
551+
/**
552+
* Extracts the exon boundaries in CDS coordinates. (needs to be divided by 3 to get AA positions)
550553
*
551554
* @param chromPos
552555
* @return
@@ -593,8 +596,7 @@ private static List<Range<Integer>> getCDSExonRangesReverse(GeneChromosomePositi
593596
if ( debug)
594597
s = new StringBuffer();
595598

596-
@SuppressWarnings("unused")
597-
int lengthExons = 0;
599+
//int lengthExons = 0;
598600

599601
// map reverse
600602
for (int i = exonStarts.size() - 1; i >= 0; i--) {
@@ -607,7 +609,7 @@ private static List<Range<Integer>> getCDSExonRangesReverse(GeneChromosomePositi
607609
end = start;
608610
start = tmp;
609611
}
610-
lengthExons += end - start;
612+
//lengthExons += end - start;
611613
//s.append("Reverse exon: " + end + " - " + start + " | " + (end - start));
612614
//s.append(newline);
613615

@@ -770,7 +772,8 @@ public static int getCDSPosForChromosomeCoordinate(int coordinate, GeneChromosom
770772
chromosomePosition.getCdsEnd());
771773
}
772774

773-
/** Converts the genetic coordinate to the position of the nucleotide on the mRNA sequence for a gene
775+
/**
776+
* Converts the genetic coordinate to the position of the nucleotide on the mRNA sequence for a gene
774777
* living on the forward DNA strand.
775778
*
776779
* @param chromPos The genetic coordinate on a chromosome
@@ -816,7 +819,8 @@ public static int getCDSPosForward(int chromPos, List<Integer> exonStarts, List<
816819
return -1;
817820
}
818821

819-
/** Converts the genetic coordinate to the position of the nucleotide on the mRNA sequence for a gene
822+
/**
823+
* Converts the genetic coordinate to the position of the nucleotide on the mRNA sequence for a gene
820824
* living on the reverse DNA strand.
821825
*
822826
* @param chromPos The genetic coordinate on a chromosome
@@ -862,15 +866,16 @@ public static int getCDSPosReverse(int chromPos, List<Integer> exonStarts, List<
862866
return -1;
863867
}
864868

865-
/** Extracts the exons boundaries in CDS coordinates corresponding to the forward DNA strand.
866-
*
867-
* @param origExonStarts The list holding the genetic coordinates pointing to the start positions of the exons (including UTR regions)
868-
* @param origExonEnds The list holding the genetic coordinates pointing to the end positions of the exons (including UTR regions)
869-
* @param cdsStart The start position of a coding region
870-
* @param cdsEnd The end position of a coding region
871-
*
872-
* @return the list of genetic positions corresponding to the exons boundaries in CDS coordinates
873-
*/
869+
/**
870+
* Extracts the exons boundaries in CDS coordinates corresponding to the forward DNA strand.
871+
*
872+
* @param origExonStarts The list holding the genetic coordinates pointing to the start positions of the exons (including UTR regions)
873+
* @param origExonEnds The list holding the genetic coordinates pointing to the end positions of the exons (including UTR regions)
874+
* @param cdsStart The start position of a coding region
875+
* @param cdsEnd The end position of a coding region
876+
*
877+
* @return the list of genetic positions corresponding to the exons boundaries in CDS coordinates
878+
*/
874879
public static List<Range<Integer>> getCDSRegions(List<Integer> origExonStarts, List<Integer> origExonEnds, int cdsStart, int cdsEnd) {
875880

876881
// remove exons that are fully landed in UTRs
@@ -903,28 +908,30 @@ public static List<Range<Integer>> getCDSRegions(List<Integer> origExonStarts, L
903908
return cdsRegion;
904909
}
905910

906-
/** Extracts the DNA sequence transcribed from the input genetic coordinates.
907-
*
908-
* @param twoBitFacade the facade that provide an access to a 2bit file
909-
* @param gcp The container with chromosomal positions
910-
*
911-
* @return the DNA sequence transcribed from the input genetic coordinates
912-
*/
911+
/**
912+
* Extracts the DNA sequence transcribed from the input genetic coordinates.
913+
*
914+
* @param twoBitFacade the facade that provide an access to a 2bit file
915+
* @param gcp The container with chromosomal positions
916+
*
917+
* @return the DNA sequence transcribed from the input genetic coordinates
918+
*/
913919
public static DNASequence getTranscriptDNASequence(TwoBitFacade twoBitFacade, GeneChromosomePosition gcp) throws Exception {
914920
return getTranscriptDNASequence(twoBitFacade,gcp.getChromosome(),gcp.getExonStarts(), gcp.getExonEnds(), gcp.getCdsStart(), gcp.getCdsEnd(), gcp.getOrientation());
915921
}
916922

917-
/** Extracts the DNA sequence transcribed from the input genetic coordinates.
918-
*
919-
* @param chromosome the name of the chromosome
920-
* @param exonStarts The list holding the genetic coordinates pointing to the start positions of the exons (including UTR regions)
921-
* @param exonEnds The list holding the genetic coordinates pointing to the end positions of the exons (including UTR regions)
922-
* @param cdsStart The start position of a coding region
923-
* @param cdsEnd The end position of a coding region
924-
* @param orientation The orientation of the strand where the gene is living
925-
*
926-
* @return the DNA sequence transcribed from the input genetic coordinates
927-
*/
923+
/**
924+
* Extracts the DNA sequence transcribed from the input genetic coordinates.
925+
*
926+
* @param chromosome the name of the chromosome
927+
* @param exonStarts The list holding the genetic coordinates pointing to the start positions of the exons (including UTR regions)
928+
* @param exonEnds The list holding the genetic coordinates pointing to the end positions of the exons (including UTR regions)
929+
* @param cdsStart The start position of a coding region
930+
* @param cdsEnd The end position of a coding region
931+
* @param orientation The orientation of the strand where the gene is living
932+
*
933+
* @return the DNA sequence transcribed from the input genetic coordinates
934+
*/
928935
public static DNASequence getTranscriptDNASequence(TwoBitFacade twoBitFacade, String chromosome, List<Integer> exonStarts, List<Integer> exonEnds, int cdsStart, int cdsEnd, Character orientation) throws Exception {
929936

930937
List<Range<Integer>> cdsRegion = getCDSRegions(exonStarts, exonEnds, cdsStart, cdsEnd);

0 commit comments

Comments
 (0)