Skip to content

Commit aa2bdcd

Browse files
committed
Fixed the problem with ALT=* in STAR-WASP.
1 parent a88eeb2 commit aa2bdcd

File tree

6 files changed

+7
-4
lines changed

6 files changed

+7
-4
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
* Fixed the problem with ALT=* in STAR-WASP.
12
* Implemented extras/scripts/soloBasicCellFilter.awk script to perform basic filtering of the STARsolo count matrices.
23

34
STAR 2.7.1a 2019/05/15

bin/Linux_x86_64/STAR

0 Bytes
Binary file not shown.

bin/Linux_x86_64/STARlong

0 Bytes
Binary file not shown.

bin/Linux_x86_64_static/STAR

-32 Bytes
Binary file not shown.

bin/Linux_x86_64_static/STARlong

-32 Bytes
Binary file not shown.

source/Variation.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ void scanVCF(ifstream& vcf, Parameters& P, SNP& snp, vector <uint> &chrStart, ma
4040

4141
vector <string> altV(3);
4242

43-
if (ref.size()==1 && splitString(alt,',',altV)==1) {
43+
if (ref.size()==1 && splitString(alt,',',altV)==1) {//only SNVs allowed - ref=1-char, alt could be comma separated list of 1-char. splitString returns the max lenght of the split strings
4444
altV.insert(altV.begin(),ref);//add ref to the beginning
4545

4646
if (chrNameIndex.count(chr)==0) {//chr not in Genome
@@ -55,13 +55,15 @@ void scanVCF(ifstream& vcf, Parameters& P, SNP& snp, vector <uint> &chrStart, ma
5555
//both alleles are reference, no need to do anything
5656
//this is a strange case in VCF when ALT allele(s) are equal to REF
5757
} else {
58-
snp.lociV.push_back(pos-1+chrStart[chrNameIndex[chr]]);
5958
array<char,3> nt1;
6059
nt1[0]=convertNt01234( ref.at(0) );
6160
nt1[1]=convertNt01234( altV.at( atoi(&sample.at(0)) ).at(0) );
6261
nt1[2]=convertNt01234( altV.at( atoi(&sample.at(2)) ).at(0) );
63-
snp.nt.push_back(nt1);
64-
snp.N++;
62+
if (nt1[0]<4 && nt1[1]<4 && nt1[2]<4) {//only record if variant is ACGT
63+
snp.lociV.push_back(pos-1+chrStart[chrNameIndex[chr]]);
64+
snp.nt.push_back(nt1);
65+
snp.N++;
66+
};
6567
};
6668
};
6769
};

0 commit comments

Comments
 (0)