Skip to content

Commit fbebc9f

Browse files
authored
Merge pull request #230 from PolinaBevad/fix_javadoc_warnings
Fixed javadoc warnings
2 parents f70d926 + 201d1ad commit fbebc9f

File tree

3 files changed

+40
-10
lines changed

3 files changed

+40
-10
lines changed

src/main/java/com/astrazeneca/vardict/data/scopedata/Scope.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
/**
1111
* Common scope of data must be storing between steps of VarDict pipeline.
12-
* @param <T>
12+
* @param <T> data of current step of pipeline
1313
*/
1414
public class Scope<T> {
1515

src/main/java/com/astrazeneca/vardict/modules/ToVarsBuilder.java

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,13 @@ public int compare(Variant o1, Variant o2) {
287287

288288
/**
289289
* Creates insertion variant from each variation on this position and adds it to the list of aligned variants.
290+
* @param duprate duplication rate of insertion
291+
* @param position position of the insertion start
292+
* @param totalPosCoverage current total position coverage (total depth) that can be updated by extra counts
293+
* @param var list of variants at the position to be updated
294+
* @param debugLines list of debug lines to be updated
295+
* @param hicov position coverage by high quality reads
296+
* @return updated total position coverage
290297
*/
291298
int createInsertion(double duprate, int position, int totalPosCoverage,
292299
List<Variant> var, List<String> debugLines, int hicov) {
@@ -371,9 +378,19 @@ int createInsertion(double duprate, int position, int totalPosCoverage,
371378

372379
/**
373380
* Creates non-insertion variant from each variation on this position and adds it to the list of aligned variants.
381+
* @param duprate duplication rate of non-insertion variant
382+
* @param alignedVars map of variants for position to get SV info
383+
* @param position position of the non-insertion variant start
384+
* @param nonInsertionVariations map of description strings and intermediate variations
385+
* @param totalPosCoverage current total position coverage (total depth) that can be updated by extra counts
386+
* @param var list of variants at the position to be updated
387+
* @param debugLines list of debug lines to be updated
388+
* @param keys sorted list of variant description strings
389+
* @param hicov position coverage by high quality reads
374390
*/
375-
void createVariant(double duprate, Map<Integer, Vars> alignedVars, int position, VariationMap<String, Variation> nonInsertionVariations,
376-
int tcov, List<Variant> var, List<String> debugLines, List<String> keys, int hicov) {
391+
void createVariant(double duprate, Map<Integer, Vars> alignedVars, int position,
392+
VariationMap<String, Variation> nonInsertionVariations, int totalPosCoverage, List<Variant> var,
393+
List<String> debugLines, List<String> keys, int hicov) {
377394
//Loop over all variants found for the position except insertions
378395
for (String descriptionString : keys) {
379396
if (descriptionString.equals("SV")) {
@@ -404,8 +421,8 @@ void createVariant(double duprate, Map<Integer, Vars> alignedVars, int position,
404421
# 1). cnt.cnt > tcov - variant count is more than position coverage
405422
# 2). cnt.cnt - tcov < cnt.extracnt - variant count is no more than position coverage + extracnt
406423
*/
407-
int ttcov = tcov;
408-
if (cnt.varsCount > tcov && cnt.extracnt > 0 && cnt.varsCount - tcov < cnt.extracnt) { //adjust position coverage if condition holds
424+
int ttcov = totalPosCoverage;
425+
if (cnt.varsCount > totalPosCoverage && cnt.extracnt > 0 && cnt.varsCount - totalPosCoverage < cnt.extracnt) { //adjust position coverage if condition holds
409426
ttcov = cnt.varsCount;
410427
}
411428

src/main/java/com/astrazeneca/vardict/postprocessmodules/SomaticPostProcessModule.java

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ public void accept(Scope<AlignedVarsData> scopeFromBam2,
9797
* @param variants variations from one BAM
9898
* @param isFirstCover if the first calling
9999
* @param varLabel type of variation (LikelyLOH, LikelySomatic, Germline, AFDiff, StrongSomatic)
100+
* @param region region from BED file
101+
* @param splice set of strings representing introns in splice
100102
* */
101103
void callingForOneSample(Vars variants, boolean isFirstCover, String varLabel, Region region, Set<String> splice) {
102104
if (variants.variants.isEmpty()) {
@@ -125,6 +127,14 @@ void callingForOneSample(Vars variants, boolean isFirstCover, String varLabel, R
125127
}
126128
}
127129

130+
/**
131+
* Run analysis of variations from BAM1 and BAM2.
132+
* @param position position on which analysis is processed
133+
* @param v1 variations from BAM1 on target position
134+
* @param v2 variations from BAM2 on target position
135+
* @param region region from BED file
136+
* @param splice set of strings representing introns in splice
137+
*/
128138
void callingForBothSamples(Integer position, Vars v1, Vars v2, Region region, Set<String> splice) {
129139
if (v1.variants.isEmpty() && v2.variants.isEmpty()) {
130140
return;
@@ -136,10 +146,12 @@ void callingForBothSamples(Integer position, Vars v1, Vars v2, Region region, Se
136146
}
137147
}
138148
/**
139-
* Analyse variations from BAM1 based on variations from BAM2.
149+
* Analyse and print variations from BAM1 based on variations from BAM2.
140150
* @param position position on which analysis is processed
141151
* @param v1 variations from BAM1 on target position
142152
* @param v2 variations from BAM2 on target position
153+
* @param region region from BED file
154+
* @param splice set of strings representing introns in splice
143155
*/
144156
private void printVariationsFromFirstSample(Integer position, Vars v1, Vars v2, Region region, Set<String> splice){
145157
int numberOfProcessedVariation = 0;
@@ -263,11 +275,13 @@ private void printVariationsFromFirstSample(Integer position, Vars v1, Vars v2,
263275
}
264276

265277
/**
266-
* Analyse variations from BAM2 based on variations from BAM1.
278+
* Analyse and print variations from BAM2 based on variations from BAM1.
267279
* @param position position on which analysis is processed
268280
* @param v1 variations from BAM1 on target position
269281
* @param v2 variations from BAM2 on target position
270-
* */
282+
* @param region region from BED file
283+
* @param splice set of strings representing introns in splice
284+
*/
271285
private void printVariationsFromSecondSample(Integer position, Vars v1, Vars v2, Region region, Set<String> splice){
272286
for (Variant v2var : v2.variants) {
273287
if (v2var.refallele.equals(v2var.varallele)) {
@@ -326,6 +340,7 @@ private void printVariationsFromSecondSample(Integer position, Vars v1, Vars v2,
326340
* @param variants variations from BAM2
327341
* @param standardVariant a variation to compare with
328342
* @param variantToCompare a variation to be compared
343+
* @param splice set of strings representing introns in splice
329344
* @return type of variation (LikelyLOH, LikelySomatic, Germline, AFDiff, StrongSomatic)
330345
* */
331346
String determinateType(Vars variants, Variant standardVariant, Variant variantToCompare, Set<String> splice) {
@@ -358,13 +373,11 @@ String determinateType(Vars variants, Variant standardVariant, Variant variantTo
358373
* Taken a likely somatic indels and see whether combine two bam files still support somatic status. This is mainly for Indels
359374
* that softclipping overhang is too short to positively being called in one bam file, but can be called in the other bam file,
360375
* thus creating false positives
361-
*
362376
* @param variant1 variant 1
363377
* @param variant2 variant 2
364378
* @param chrName chromosome
365379
* @param position position
366380
* @param descriptionString description string of variant
367-
*
368381
* @param splice set of strings representing introns in splice
369382
* @param maxReadLength max read length
370383
* @return (new <code>maxReadLength</code>, "FALSE" | "")

0 commit comments

Comments
 (0)