a little clean-up: move setting the bases of generated reads into Artificial SAM Utils now that the clean read injector test is gone.

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2919 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
aaron 2010-03-03 16:31:45 +00:00
parent 790d2a7776
commit ca2cd9d4f5
3 changed files with 8 additions and 15 deletions

View File

@ -154,11 +154,13 @@ public class ArtificialSAMUtils {
elements.add(new CigarElement(length, CigarOperator.characterToEnum('M'))); elements.add(new CigarElement(length, CigarOperator.characterToEnum('M')));
record.setCigar(new Cigar(elements)); record.setCigar(new Cigar(elements));
record.setProperPairFlag(false); record.setProperPairFlag(false);
// TODO: add to code after checking why it breaks the clean read injector test
/*byte[] c = new byte[length]; // our reads are all 'A's by default
byte[] c = new byte[length];
for (int x = 0; x < length; x++) for (int x = 0; x < length; x++)
c[x] = 'A'; */ c[x] = 'A';
//record.setReadBases(c); record.setReadBases(c);
if (refIndex == SAMRecord.NO_ALIGNMENT_REFERENCE_INDEX) { if (refIndex == SAMRecord.NO_ALIGNMENT_REFERENCE_INDEX) {
record.setReadUmappedFlag(true); record.setReadUmappedFlag(true);
} }

View File

@ -73,12 +73,7 @@ public class ReadBasedReferenceOrderedViewTest extends BaseTest {
// make ten reads, // make ten reads,
List<SAMRecord> records = new ArrayList<SAMRecord>(); List<SAMRecord> records = new ArrayList<SAMRecord>();
for (int x = 1; x < 11; x++) { for (int x = 1; x < 11; x++) {
SAMRecord rec = ArtificialSAMUtils.createArtificialRead(header, "name", 0, x, 10); SAMRecord rec = ArtificialSAMUtils.createArtificialRead(header, "name", 0, x, 10);
byte[] c = new byte[10];
for (int y = 0; y < 10; y++)
c[y] = 'A';
rec.setReadBases(c);
records.add(rec);
} }
GenomeLoc start = GenomeLocParser.createGenomeLoc(0,0,0); GenomeLoc start = GenomeLocParser.createGenomeLoc(0,0,0);
List<RMDDataState> list = new ArrayList<RMDDataState>(); List<RMDDataState> list = new ArrayList<RMDDataState>();

View File

@ -107,11 +107,7 @@ public class ReadMetaDataTrackerTest extends BaseTest {
} }
private ReadMetaDataTracker getRMDT(int incr) { private ReadMetaDataTracker getRMDT(int incr) {
SAMRecord record = ArtificialSAMUtils.createArtificialRead(header, "name", 0, 1, 10); SAMRecord record = ArtificialSAMUtils.createArtificialRead(header, "name", 0, 1, 10);
byte[] c = new byte[10];
for (int x = 0; x < 10; x++)
c[x] = 'A';
record.setReadBases(c);
TreeMap<Long, Set<ReferenceOrderedDatum>> data = new TreeMap<Long, Set<ReferenceOrderedDatum>>(); TreeMap<Long, Set<ReferenceOrderedDatum>> data = new TreeMap<Long, Set<ReferenceOrderedDatum>>();
for (int x = 0; x < record.getAlignmentEnd(); x+=incr) { for (int x = 0; x < record.getAlignmentEnd(); x+=incr) {
GenomeLoc loc = GenomeLocParser.createGenomeLoc(record.getReferenceIndex(), record.getAlignmentStart() + x, record.getAlignmentStart() + x); GenomeLoc loc = GenomeLocParser.createGenomeLoc(record.getReferenceIndex(), record.getAlignmentStart() + x, record.getAlignmentStart() + x);