Skip to content
Snippets Groups Projects
Commit eac670d1 authored by tcarver's avatar tcarver
Browse files

name change for genotypeData setter and getter in VCFRecord

parent e108278e
Branches
Tags
No related merge requests found
...@@ -250,7 +250,7 @@ class BCFReader extends AbstractVCFReader ...@@ -250,7 +250,7 @@ class BCFReader extends AbstractVCFReader
int nc = (int) (n_alleles * ((float)(((float)n_alleles+1.f)/2.f))); int nc = (int) (n_alleles * ((float)(((float)n_alleles+1.f)/2.f)));
String fmts[] = VCFRecord.COLON_PATTERN.split( bcfRecord.getFormat() ); String fmts[] = VCFRecord.COLON_PATTERN.split( bcfRecord.getFormat() );
bcfRecord.setData( new String[nsamples][fmts.length] ); bcfRecord.setGenoTypeData( new String[nsamples][fmts.length] );
for(int i=0; i<fmts.length; i++) for(int i=0; i<fmts.length; i++)
{ {
...@@ -261,22 +261,22 @@ class BCFReader extends AbstractVCFReader ...@@ -261,22 +261,22 @@ class BCFReader extends AbstractVCFReader
if(fmts[i].equals("GT")) if(fmts[i].equals("GT"))
{ {
for(int j=0; j<nsamples; j++) for(int j=0; j<nsamples; j++)
bcfRecord.getData()[j][i] = getGTString(str[j]); bcfRecord.getGenoTypeData()[j][i] = getGTString(str[j]);
} }
else if(fmts[i].equals("PL")) else if(fmts[i].equals("PL"))
{ {
String pls[] = getPLString(str, nsamples); String pls[] = getPLString(str, nsamples);
for(int j=0; j<nsamples; j++) for(int j=0; j<nsamples; j++)
bcfRecord.getData()[j][i] = pls[j]; bcfRecord.getGenoTypeData()[j][i] = pls[j];
} }
else if(fmts[i].equals("DP")||fmts[i].equals("SP")||fmts[i].equals("GQ")) else if(fmts[i].equals("DP")||fmts[i].equals("SP")||fmts[i].equals("GQ"))
{ {
for(int j=0; j<nsamples; j++) for(int j=0; j<nsamples; j++)
bcfRecord.getData()[j][i] = Integer.toString(byteToInt(str[j])); bcfRecord.getGenoTypeData()[j][i] = Integer.toString(byteToInt(str[j]));
} }
else else
{ {
bcfRecord.getData()[0][i] = new String(str); bcfRecord.getGenoTypeData()[0][i] = new String(str);
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment