forked from richardmleggett/NanoOK
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b509ed0
commit 0115106
Showing
4 changed files
with
71 additions
and
2 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/* | ||
* Program: NanoOK | ||
* Author: Richard M. Leggett | ||
* | ||
* Copyright 2015 The Genome Analysis Centre (TGAC) | ||
*/ | ||
|
||
package nanook; | ||
|
||
import java.io.File; | ||
|
||
/** | ||
* Parser for Ngmlr files | ||
* @author Richard Leggett | ||
*/ | ||
public class NgmlrParser extends SAMParser implements AlignmentFileParser { | ||
private String alignmentParams = "-x ont"; | ||
private NanoOKOptions options; | ||
|
||
public NgmlrParser(NanoOKOptions o, References r) { | ||
super(o, r); | ||
options = o; | ||
} | ||
|
||
public String getProgramID() { | ||
return "ngmlr"; | ||
} | ||
|
||
public int getReadFormat() { | ||
int or = options.getReadFormat(); | ||
return or; | ||
|
||
//return NanoOKOptions.FASTA; | ||
} | ||
|
||
public void setAlignmentParams(String p) { | ||
alignmentParams = p; | ||
} | ||
|
||
public boolean outputsToStdout() { | ||
return false; | ||
} | ||
|
||
public String getRunCommand(String query, String output, String reference) { | ||
//reference = reference.replaceAll("\\.fasta$", ""); | ||
//reference = reference.replaceAll("\\.fa$", ""); | ||
|
||
return "ngmlr -r " + reference + " -q " + query + " -o "+output; | ||
} | ||
|
||
public void checkForIndex(String referenceFile) { | ||
//File f = new File(referenceFile + ".fasta.mmi"); | ||
|
||
//System.out.println("Checking!!!"); | ||
|
||
//if (!f.exists()) { | ||
// System.out.println(""); | ||
// System.out.println("Error:"); | ||
// System.out.println("Can't find file " + f.getPath()); | ||
// System.out.println("Have you indexed the reference with minimap2 -d ref.fasta.mmi ref.fasta?"); | ||
// System.exit(1); | ||
//} | ||
|
||
return; | ||
} | ||
} |