Skip to content

Commit

Permalink
Merge pull request #230 from PolinaBevad/fix_javadoc_warnings
Browse files Browse the repository at this point in the history
Fixed javadoc warnings
  • Loading branch information
pcingola authored May 30, 2019
2 parents f70d926 + 201d1ad commit fbebc9f
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

/**
* Common scope of data must be storing between steps of VarDict pipeline.
* @param <T>
* @param <T> data of current step of pipeline
*/
public class Scope<T> {

Expand Down
25 changes: 21 additions & 4 deletions src/main/java/com/astrazeneca/vardict/modules/ToVarsBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,13 @@ public int compare(Variant o1, Variant o2) {

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

/**
* Creates non-insertion variant from each variation on this position and adds it to the list of aligned variants.
* @param duprate duplication rate of non-insertion variant
* @param alignedVars map of variants for position to get SV info
* @param position position of the non-insertion variant start
* @param nonInsertionVariations map of description strings and intermediate variations
* @param totalPosCoverage current total position coverage (total depth) that can be updated by extra counts
* @param var list of variants at the position to be updated
* @param debugLines list of debug lines to be updated
* @param keys sorted list of variant description strings
* @param hicov position coverage by high quality reads
*/
void createVariant(double duprate, Map<Integer, Vars> alignedVars, int position, VariationMap<String, Variation> nonInsertionVariations,
int tcov, List<Variant> var, List<String> debugLines, List<String> keys, int hicov) {
void createVariant(double duprate, Map<Integer, Vars> alignedVars, int position,
VariationMap<String, Variation> nonInsertionVariations, int totalPosCoverage, List<Variant> var,
List<String> debugLines, List<String> keys, int hicov) {
//Loop over all variants found for the position except insertions
for (String descriptionString : keys) {
if (descriptionString.equals("SV")) {
Expand Down Expand Up @@ -404,8 +421,8 @@ void createVariant(double duprate, Map<Integer, Vars> alignedVars, int position,
# 1). cnt.cnt > tcov - variant count is more than position coverage
# 2). cnt.cnt - tcov < cnt.extracnt - variant count is no more than position coverage + extracnt
*/
int ttcov = tcov;
if (cnt.varsCount > tcov && cnt.extracnt > 0 && cnt.varsCount - tcov < cnt.extracnt) { //adjust position coverage if condition holds
int ttcov = totalPosCoverage;
if (cnt.varsCount > totalPosCoverage && cnt.extracnt > 0 && cnt.varsCount - totalPosCoverage < cnt.extracnt) { //adjust position coverage if condition holds
ttcov = cnt.varsCount;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ public void accept(Scope<AlignedVarsData> scopeFromBam2,
* @param variants variations from one BAM
* @param isFirstCover if the first calling
* @param varLabel type of variation (LikelyLOH, LikelySomatic, Germline, AFDiff, StrongSomatic)
* @param region region from BED file
* @param splice set of strings representing introns in splice
* */
void callingForOneSample(Vars variants, boolean isFirstCover, String varLabel, Region region, Set<String> splice) {
if (variants.variants.isEmpty()) {
Expand Down Expand Up @@ -125,6 +127,14 @@ void callingForOneSample(Vars variants, boolean isFirstCover, String varLabel, R
}
}

/**
* Run analysis of variations from BAM1 and BAM2.
* @param position position on which analysis is processed
* @param v1 variations from BAM1 on target position
* @param v2 variations from BAM2 on target position
* @param region region from BED file
* @param splice set of strings representing introns in splice
*/
void callingForBothSamples(Integer position, Vars v1, Vars v2, Region region, Set<String> splice) {
if (v1.variants.isEmpty() && v2.variants.isEmpty()) {
return;
Expand All @@ -136,10 +146,12 @@ void callingForBothSamples(Integer position, Vars v1, Vars v2, Region region, Se
}
}
/**
* Analyse variations from BAM1 based on variations from BAM2.
* Analyse and print variations from BAM1 based on variations from BAM2.
* @param position position on which analysis is processed
* @param v1 variations from BAM1 on target position
* @param v2 variations from BAM2 on target position
* @param region region from BED file
* @param splice set of strings representing introns in splice
*/
private void printVariationsFromFirstSample(Integer position, Vars v1, Vars v2, Region region, Set<String> splice){
int numberOfProcessedVariation = 0;
Expand Down Expand Up @@ -263,11 +275,13 @@ private void printVariationsFromFirstSample(Integer position, Vars v1, Vars v2,
}

/**
* Analyse variations from BAM2 based on variations from BAM1.
* Analyse and print variations from BAM2 based on variations from BAM1.
* @param position position on which analysis is processed
* @param v1 variations from BAM1 on target position
* @param v2 variations from BAM2 on target position
* */
* @param region region from BED file
* @param splice set of strings representing introns in splice
*/
private void printVariationsFromSecondSample(Integer position, Vars v1, Vars v2, Region region, Set<String> splice){
for (Variant v2var : v2.variants) {
if (v2var.refallele.equals(v2var.varallele)) {
Expand Down Expand Up @@ -326,6 +340,7 @@ private void printVariationsFromSecondSample(Integer position, Vars v1, Vars v2,
* @param variants variations from BAM2
* @param standardVariant a variation to compare with
* @param variantToCompare a variation to be compared
* @param splice set of strings representing introns in splice
* @return type of variation (LikelyLOH, LikelySomatic, Germline, AFDiff, StrongSomatic)
* */
String determinateType(Vars variants, Variant standardVariant, Variant variantToCompare, Set<String> splice) {
Expand Down Expand Up @@ -358,13 +373,11 @@ String determinateType(Vars variants, Variant standardVariant, Variant variantTo
* Taken a likely somatic indels and see whether combine two bam files still support somatic status. This is mainly for Indels
* that softclipping overhang is too short to positively being called in one bam file, but can be called in the other bam file,
* thus creating false positives
*
* @param variant1 variant 1
* @param variant2 variant 2
* @param chrName chromosome
* @param position position
* @param descriptionString description string of variant
*
* @param splice set of strings representing introns in splice
* @param maxReadLength max read length
* @return (new <code>maxReadLength</code>, "FALSE" | "")
Expand Down

0 comments on commit fbebc9f

Please sign in to comment.