Skip to content

Commit

Permalink
fix: dictionary arg
Browse files Browse the repository at this point in the history
  • Loading branch information
sanashah007 committed Aug 5, 2024
1 parent 87e10bc commit 32bb1dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@

import htsjdk.samtools.SAMSequenceDictionary;
import htsjdk.samtools.util.Interval;
import org.broadinstitute.barclay.argparser.Argument;
import org.broadinstitute.hellbender.utils.Utils;

import java.util.Comparator;
import java.util.Map;

public class CompareGtfInfo implements Comparator<Map.Entry<String, GtfInfo>> {

@Argument(shortName = "SD", fullName = "SEQUENCE_DICTIONARY", optional = true)//TODO: figure this out
SAMSequenceDictionary dictionary;
private final SAMSequenceDictionary dictionary;

CompareGtfInfo(SAMSequenceDictionary dictionary) {
this.dictionary = dictionary;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package org.broadinstitute.hellbender.tools.walkers.conversion;

import htsjdk.samtools.*; //TODO: make these individual imports
import htsjdk.samtools.SAMSequenceDictionary;
import htsjdk.samtools.SamReader;
import htsjdk.samtools.SamReaderFactory;
import htsjdk.samtools.util.*;
import htsjdk.tribble.Feature;
import org.broadinstitute.barclay.argparser.Argument;
Expand Down Expand Up @@ -73,7 +75,6 @@
programGroup = ShortVariantDiscoveryProgramGroup.class
)

//TODO: make args all caps
public class GtfToBed extends FeatureWalker<GencodeGtfFeature> {
public static final String SORT_BY_TRANSCRIPT_LONG_NAME = "SORT_BY_TRANSCRIPT";
public static final String SEQUENCE_DICTIONARY_LONG_NAME = "SEQUENCE_DICTIONARY";
Expand Down Expand Up @@ -229,7 +230,7 @@ public Object onTraversalSuccess() {

// reads the dictionary
private SAMSequenceDictionary getSequenceDictionary(String dictionaryPath) {
SamReader reader = SamReaderFactory.makeDefault().open(new File(dictionaryPath)); //TODO: figure out what makeDefault() does
SamReader reader = SamReaderFactory.makeDefault().open(new File(dictionaryPath));

return reader.getFileHeader().getSequenceDictionary();
}
Expand Down

0 comments on commit 32bb1dd

Please sign in to comment.