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')));
record.setCigar(new Cigar(elements));
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++)
c[x] = 'A'; */
//record.setReadBases(c);
c[x] = 'A';
record.setReadBases(c);
if (refIndex == SAMRecord.NO_ALIGNMENT_REFERENCE_INDEX) {
record.setReadUmappedFlag(true);
}

View File

@ -73,12 +73,7 @@ public class ReadBasedReferenceOrderedViewTest extends BaseTest {
// make ten reads,
List<SAMRecord> records = new ArrayList<SAMRecord>();
for (int x = 1; x < 11; x++) {
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);
SAMRecord rec = ArtificialSAMUtils.createArtificialRead(header, "name", 0, x, 10);
}
GenomeLoc start = GenomeLocParser.createGenomeLoc(0,0,0);
List<RMDDataState> list = new ArrayList<RMDDataState>();

View File

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