Something you could try is to make the function return a true or false depending on strandedness so that you can use the output of the function as an argument for the Adjust for Softclipping function (eg. AdjustForSoftclipping(startPos. CIGAR, CheckStrandedness(BitFlag))).
Something you could try is to make the function return a true or false depending on strandedness so that you can use the output of the function as an argument for the Adjust for Softclipping function (eg. AdjustForSoftclipping(startPos. CIGAR, CheckStrandedness(BitFlag))).