A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/marbl/canu/commit/d6b7a1f774a65c37b7b98a8b6c69b7397b059241 below:

Add -minlength option to discard short overlaps. · marbl/canu@d6b7a1f · GitHub

File tree Expand file treeCollapse file tree 1 file changed

+14

-2

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+14

-2

lines changed Original file line number Diff line number Diff line change

@@ -28,6 +28,7 @@ int

28 28

main(int argc, char **argv) {

29 29

char *outName = NULL;

30 30

char *seqName = NULL;

31 +

int32 minLength = 0;

31 32 32 33

vector<char *> files;

33 34

@@ -41,6 +42,9 @@ main(int argc, char **argv) {

41 42

} else if (strcmp(argv[arg], "-S") == 0) {

42 43

seqName = argv[++arg];

43 44 45 +

} else if (strcmp(argv[arg], "-minlength") == 0) {

46 +

minLength = strtoint32(argv[++arg]);

47 + 44 48

} else if (fileExists(argv[arg])) {

45 49

files.push_back(argv[arg]);

46 50

@@ -55,6 +59,7 @@ main(int argc, char **argv) {

55 59

if ((err) || (seqName == NULL) || (outName == NULL) || (files.size() == 0)) {

56 60

fprintf(stderr, "usage: %s -S seqStore -o output.ovb input.mhap[.gz]\n", argv[0]);

57 61

fprintf(stderr, " Converts mhap native output to ovb\n");

62 +

fprintf(stderr, " -minlength X discards overlaps below X bp long.\n");

58 63 59 64

if (seqName == NULL)

60 65

fprintf(stderr, "ERROR: no seqStore (-S) supplied\n");

@@ -147,9 +152,16 @@ main(int argc, char **argv) {

147 152

ov.dat.ovl.bhg5, ov.dat.ovl.bhg3,

148 153

(ov.dat.ovl.flipped) ? " flipped" : ""), exit(1);

149 154 150 -

// Overlap looks good, write it!

155 +

// Overlap looks good, write it if its long enough. Bogart is

156 +

// computing overlap length as the max number of bases covered on

157 +

// either read.

158 + 159 +

int32 oalen = alen - ov.dat.ovl.ahg5 - ov.dat.ovl.ahg3;

160 +

int32 oblen = blen - ov.dat.ovl.bhg5 - ov.dat.ovl.bhg3;

151 161 152 -

of->writeOverlap(&ov);

162 +

if ((minLength <= oalen) ||

163 +

(minLength <= oblen))

164 +

of->writeOverlap(&ov);

153 165

}

154 166 155 167

delete in;

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4