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
S
sumalibs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
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
OBITools
sumalibs
Compare Revisions
b11748eac8b2ff68388d44bcba577323cebe5b08...9f08b85eaf92fd2a51e556212a9eb2693f6a66f5
Source
9f08b85eaf92fd2a51e556212a9eb2693f6a66f5
Select Git revision
...
Target
b11748eac8b2ff68388d44bcba577323cebe5b08
Select Git revision
Compare
Commits (2)
Made sequence parsing more robust (issue with arm64 systems)
· d7cd7e26
Celine Mercier
authored
Apr 13, 2020
d7cd7e26
Optimised sequence parsing (from previous commit)
· 9f08b85e
Celine Mercier
authored
Apr 13, 2020
9f08b85e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
libfasta/sequence.c
libfasta/sequence.c
+7
-2
No files found.
libfasta/sequence.c
View file @
9f08b85e
...
...
@@ -162,19 +162,24 @@ void seq_fillSeqOnlyATGC(char *seq, fastaSeqPtr seqElem, int seqLen)
{
char
*
seqTemp
;
char
c
;
int32_t
index
=
0
,
seqIndex
=
0
,
len
=
strlen
(
seq
);
int32_t
index
=
1
,
seqIndex
=
0
,
len
=
strlen
(
seq
);
char
*
seqAlphabets
=
"acgtACGT"
;
int
notAllATGC
=
0
;
int
goOnParsing
=
1
;
seqTemp
=
(
char
*
)
util_malloc
(
seqLen
*
sizeof
(
char
),
__FILE__
,
__LINE__
);
while
(
index
<
len
)
while
(
goOnParsing
)
{
c
=
seq
[
index
++
];
if
(
strchr
(
seqAlphabets
,
c
)
!=
NULL
)
seqTemp
[
seqIndex
++
]
=
tolower
(
c
);
else
if
(
seq
[
index
+
1
]
==
'\0'
)
goOnParsing
=
0
;
// end of the sequence has been reached.
else
if
(
c
!=
'\n'
)
notAllATGC
=
1
;
if
(
index
==
len
)
goOnParsing
=
0
;
}
if
(
notAllATGC
)
...
...