Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
ORG.Asm
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
23
Issues
23
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ORG.Asm
ORG.Asm
Commits
6daa7e02
Commit
6daa7e02
authored
Apr 08, 2013
by
Eric Coissac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a -M option to orgasmi
parent
fc8356f5
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
31 additions
and
14 deletions
+31
-14
src/buffer.c
src/buffer.c
+5
-1
src/buildexpand8bits.c
src/buildexpand8bits.c
+6
-6
src/buildindex.c
src/buildindex.c
+2
-1
src/fastq.c
src/fastq.c
+2
-1
src/load.c
src/load.c
+1
-1
src/orgasm.h
src/orgasm.h
+3
-1
src/orgasmi.c
src/orgasmi.c
+12
-3
No files found.
src/buffer.c
View file @
6daa7e02
...
...
@@ -8,10 +8,11 @@
#include "orgasm.h"
buffer_t
*
newBuffer
(
size_t
maxsize
,
size_t
readSize
)
buffer_t
*
newBuffer
(
size_t
maxsize
,
size_t
readSize
,
size_t
maxread
)
{
#define MASK ((size_t)0xF)
#define CLEAN ((size_t)~MASK)
#define MIN(x,y) (((x) > (y)) ? (y):(x))
buffer_t
*
rep
;
size_t
rsize
=
round16
(
readSize
)
/
4
+
2
*
sizeof
(
uint32_t
);
...
...
@@ -19,6 +20,9 @@ buffer_t *newBuffer(size_t maxsize,size_t readSize)
if
(((
maxsize
-
48
)
/
rsize
)
>
(
size_t
)
0xFFFFFFFF
)
maxsize
=
(
size_t
)
0xFFFFFFFF
*
rsize
+
48
;
if
(
maxread
>
0
)
maxsize
=
MIN
(
maxread
*
rsize
+
48
,
maxsize
);
rep
=
MALLOC
(
sizeof
(
buffer_t
));
rep
->
arena
=
MALLOC
(
maxsize
);
...
...
src/buildexpand8bits.c
View file @
6daa7e02
...
...
@@ -36,12 +36,12 @@ int main(int argc, char *argv[])
for
(
i
=
0
;
i
<
4
;
i
++
)
nuc
[
3
-
i
]
=
(
icode
>>
(
i
*
2
))
&
3
;
#ifdef LITTLE_END
*
((
uint32_t
*
)
nuc
)
=
*
((
uint32_t
*
)
nuc
)
>>
24
|
\
*
((
uint32_t
*
)
nuc
)
<<
24
|
\
((
*
((
uint32_t
*
)
nuc
)
>>
8
)
&
0x0000FF00
)
|
\
((
*
((
uint32_t
*
)
nuc
)
<<
8
)
&
0x00FF0000
);
#endif
//
#ifdef LITTLE_END
//
*((uint32_t*)nuc) = *((uint32_t*)nuc) >> 24 | \
//
*((uint32_t*)nuc) << 24 | \
//
((*((uint32_t*)nuc) >> 8) & 0x0000FF00) | \
//
((*((uint32_t*)nuc) << 8) & 0x00FF0000);
//
#endif
if
(
code
<
0xFF
)
fprintf
(
stdout
,
" 0x%08XUL, // %04X
\n
"
,
*
((
uint32_t
*
)
nuc
),
code
);
...
...
src/buildindex.c
View file @
6daa7e02
...
...
@@ -9,6 +9,7 @@
buffer_t
*
buildIndex
(
const
char
*
forwardFileName
,
const
char
*
reverseFileName
,
const
char
*
indexname
,
uint32_t
minword
,
size_t
maxread
,
size_t
maxbuffersize
)
{
...
...
@@ -32,7 +33,7 @@ buffer_t *buildIndex(const char *forwardFileName, const char* reverseFileName,
if
(
reverse
==
NULL
)
FATALERROR
(
"Cannot open file %s"
,
reverseFileName
)
reads
=
loadPairedFastq
(
forward
,
reverse
,
maxbuffersize
);
reads
=
loadPairedFastq
(
forward
,
reverse
,
max
read
,
max
buffersize
);
fclose
(
forward
);
fclose
(
reverse
);
...
...
src/fastq.c
View file @
6daa7e02
...
...
@@ -140,6 +140,7 @@ uint8_t checkACGT(const char* src, size_t size)
buffer_t
*
loadPairedFastq
(
FILE
*
forward
,
FILE
*
reverse
,
size_t
maxread
,
size_t
maxbuffersize
)
{
...
...
@@ -178,7 +179,7 @@ buffer_t * loadPairedFastq(FILE* forward,
readLength
=
readPairedFastq
(
reads
,
forward
,
reverse
,
buffersize
);
seqbuffer
=
newBuffer
(
maxbuffersize
,
readLength
);
seqbuffer
=
newBuffer
(
maxbuffersize
,
readLength
,
maxread
);
encodedseqs
=
(
uint32_t
*
)(
seqbuffer
->
records
);
while
(
readLength
&&
(
seqbuffer
->
readCount
+
2
)
<=
seqbuffer
->
maxrecord
)
...
...
src/load.c
View file @
6daa7e02
...
...
@@ -47,7 +47,7 @@ buffer_t *loadIndexedReads(const char *indexname)
maxsize
=
(
tmp
.
recordSize
+
\
2
*
sizeof
(
uint32_t
))
*
tmp
.
readCount
+
48
;
reads
=
newBuffer
(
maxsize
,
tmp
.
readSize
);
reads
=
newBuffer
(
maxsize
,
tmp
.
readSize
,
0
);
reads
->
readCount
=
tmp
.
readCount
;
...
...
src/orgasm.h
View file @
6daa7e02
...
...
@@ -105,16 +105,18 @@ char *decodeSequence(pnuc buffer, uint32_t begin, int32_t length, char *dest);
buffer_t
*
loadPairedFastq
(
FILE
*
forward
,
FILE
*
reverse
,
size_t
maxread
,
size_t
maxbuffersize
);
buffer_t
*
buildIndex
(
const
char
*
forwardFileName
,
const
char
*
reverseFileName
,
const
char
*
indexname
,
uint32_t
minword
,
size_t
maxread
,
size_t
maxbuffersize
);
buffer_t
*
newBuffer
(
size_t
maxsize
,
size_t
readSize
);
buffer_t
*
newBuffer
(
size_t
maxsize
,
size_t
readSize
,
size_t
maxread
);
void
freeBuffer
(
buffer_t
*
buffer
);
void
swapOrder
(
buffer_t
*
buffer
);
...
...
src/orgasmi.c
View file @
6daa7e02
...
...
@@ -6,6 +6,7 @@
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <getopt.h>
...
...
@@ -39,6 +40,7 @@ static void PrintHelp()
PP
" <index>.orx : contains reverse index
\n
"
);
PP
" <index>.opx : contains read pairing data
\n\n
"
);
PP
" The assembler will need all these file to process assembling
\n\n
"
);
PP
"-M : If specified the count in million of reads to index"
);
PP
"-h : [H]elp - print <this> help
\n\n
"
);
PP
"
\n
"
);
PP
"------------------------------------------
\n
"
);
...
...
@@ -73,6 +75,7 @@ int main(int argc, char *argv[])
{
buffer_t
*
reads
;
char
*
indexfiles
=
NULL
;
size_t
toread
=
0
;
int
carg
;
int
errflag
=
0
;
...
...
@@ -85,7 +88,7 @@ int main(int argc, char *argv[])
while
((
carg
=
getopt
(
argc
,
argv
,
"ho:"
))
!=
-
1
)
{
while
((
carg
=
getopt
(
argc
,
argv
,
"h
M:
o:"
))
!=
-
1
)
{
switch
(
carg
)
{
/* -------------------- */
...
...
@@ -102,7 +105,13 @@ while ((carg = getopt(argc, argv, "ho:")) != -1) {
strcpy
(
indexfiles
,(
const
char
*
)
optarg
);
break
;
break
;
/* -------------------- */
case
'M'
:
/* index name */
/* -------------------- */
toread
=
atoll
((
const
char
*
)
optarg
)
*
1000000
;
break
;
break
;
case
'?'
:
/* bad option */
/* -------------------- */
...
...
@@ -138,7 +147,7 @@ if (errflag)
#define MAXREAD 2000000000
reads
=
buildIndex
(
forwardFileName
,
reverseFileName
,
indexfiles
,
95
,
MAXREAD
);
reads
=
buildIndex
(
forwardFileName
,
reverseFileName
,
indexfiles
,
95
,
toread
,
MAXREAD
);
freeBuffer
(
reads
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment