Skip to content
GitLab
探索
登录
主导航
搜索或转到…
项目
F
fastp
管理
动态
成员
标记
计划
议题
0
议题看板
里程碑
迭代
Wiki
代码
合并请求
0
仓库
分支
提交
标签
仓库图
比较修订版本
代码片段
锁定的文件
构建
流水线
作业
流水线计划
产物
部署
发布
软件包库
运维
环境
Terraform 模块
监控
事件
服务台
分析
价值流分析
Contributor analytics
CI/CD 分析
仓库分析
代码评审分析
议题分析
模型实验
帮助
帮助
支持
GitLab 文档
比较 GitLab 各版本
社区论坛
为极狐GitLab 提交贡献
提交反馈
快捷键
?
支持
扫描加入微信群:
1. 获取企业级DevOps解决方案支持
2. 免费或折扣极狐GitLab 官方培训认证
代码片段
群组
项目
HPCSource
fastp
提交
a209dc4c
提交
a209dc4c
编辑于
6年前
作者:
Shifu Chen
浏览文件
操作
下载
补丁
差异文件
output debug info for index filtering
上级
4e296959
分支
add-index-filter
标签
标签 包含提交
无相关合并请求
变更
4
隐藏空白变更内容
行内
左右并排
显示
4 个更改的文件
src/options.cpp
+12
-8
12 个添加, 8 个删除
src/options.cpp
src/options.h
+1
-1
1 个添加, 1 个删除
src/options.h
src/peprocessor.cpp
+6
-5
6 个添加, 5 个删除
src/peprocessor.cpp
src/seprocessor.cpp
+5
-4
5 个添加, 4 个删除
src/seprocessor.cpp
有
24 个添加
和
18 个删除
src/options.cpp
+
12
−
8
浏览文件 @
a209dc4c
...
...
@@ -197,14 +197,15 @@ void Options::initIndexFiltering(string blacklistFile1, string blacklistFile2, i
if
(
blacklistFile1
.
empty
()
&&
blacklistFile2
.
empty
())
return
;
if
(
!
blacklistFile1
.
empty
())
if
(
!
blacklistFile1
.
empty
())
{
check_file_valid
(
blacklistFile1
);
indexFilter
.
blacklist1
=
makeListFromFileByLine
(
blacklistFile1
);
}
if
(
!
blacklistFile2
.
empty
())
if
(
!
blacklistFile2
.
empty
())
{
check_file_valid
(
blacklistFile2
);
indexFilter
.
blacklist1
=
makeListFromFileByLine
(
blacklistFile1
);
indexFilter
.
blacklist2
=
makeListFromFileByLine
(
blacklistFile2
);
indexFilter
.
blacklist2
=
makeListFromFileByLine
(
blacklistFile2
);
}
if
(
indexFilter
.
blacklist1
.
empty
()
&&
indexFilter
.
blacklist2
.
empty
())
return
;
...
...
@@ -213,12 +214,13 @@ void Options::initIndexFiltering(string blacklistFile1, string blacklistFile2, i
indexFilter
.
threshold
=
threshold
;
}
vector
<
string
>
Options
::
makeListFromFileByLine
(
string
blacklistFile1
)
{
vector
<
string
>
Options
::
makeListFromFileByLine
(
string
filename
)
{
vector
<
string
>
ret
;
ifstream
file
;
file
.
open
(
blacklistFile1
.
c_str
(),
ifstream
::
in
);
file
.
open
(
filename
.
c_str
(),
ifstream
::
in
);
const
int
maxLine
=
1000
;
char
line
[
maxLine
];
cerr
<<
"filter by index, loading "
<<
filename
<<
endl
;
while
(
file
.
getline
(
line
,
maxLine
)){
// trim \n, \r or \r\n in the tail
int
readed
=
strlen
(
line
);
...
...
@@ -232,10 +234,12 @@ vector<string> Options::makeListFromFileByLine(string blacklistFile1) {
string
linestr
(
line
);
for
(
int
i
=
0
;
i
<
linestr
.
length
();
i
++
)
{
if
(
linestr
[
i
]
!=
'A'
&&
linestr
[
i
]
!=
'T'
&&
linestr
[
i
]
!=
'C'
&&
linestr
[
i
]
!=
'G'
)
{
error_exit
(
"processing "
+
blacklistFile1
+
", each line should be one barcode, which can only contain A/T/C/G"
);
error_exit
(
"processing "
+
filename
+
", each line should be one barcode, which can only contain A/T/C/G"
);
}
}
cerr
<<
linestr
<<
endl
;
ret
.
push_back
(
linestr
);
}
cerr
<<
endl
;
return
ret
;
}
This diff is collapsed.
Click to expand it.
src/options.h
+
1
−
1
浏览文件 @
a209dc4c
...
...
@@ -219,7 +219,7 @@ public:
bool
validate
();
bool
adapterCuttingEnabled
();
void
initIndexFiltering
(
string
blacklistFile1
,
string
blacklistFile2
,
int
threshold
=
0
);
vector
<
string
>
makeListFromFileByLine
(
string
blacklistFile1
);
vector
<
string
>
makeListFromFileByLine
(
string
filename
);
public:
// file name of read1 input
...
...
This diff is collapsed.
Click to expand it.
src/peprocessor.cpp
+
6
−
5
浏览文件 @
a209dc4c
...
...
@@ -186,11 +186,6 @@ bool PairEndProcessor::processPairEnd(ReadPairPack* pack, ThreadConfig* config){
ReadPair
*
pair
=
pack
->
data
[
p
];
Read
*
or1
=
pair
->
mLeft
;
Read
*
or2
=
pair
->
mRight
;
// filter by index
if
(
mFilter
->
filterByIndex
(
or1
,
or2
))
{
delete
pair
;
continue
;
}
int
lowQualNum1
=
0
;
int
nBaseNum1
=
0
;
...
...
@@ -201,6 +196,12 @@ bool PairEndProcessor::processPairEnd(ReadPairPack* pack, ThreadConfig* config){
config
->
getPreStats1
()
->
statRead
(
or1
);
config
->
getPreStats2
()
->
statRead
(
or2
);
// filter by index
if
(
mOptions
->
indexFilter
.
enabled
&&
mFilter
->
filterByIndex
(
or1
,
or2
))
{
delete
pair
;
continue
;
}
// umi processing
if
(
mOptions
->
umi
.
enabled
)
mUmiProcessor
->
process
(
or1
,
or2
);
...
...
This diff is collapsed.
Click to expand it.
src/seprocessor.cpp
+
5
−
4
浏览文件 @
a209dc4c
...
...
@@ -157,14 +157,15 @@ bool SingleEndProcessor::processSingleEnd(ReadPack* pack, ThreadConfig* config){
// original read1
Read
*
or1
=
pack
->
data
[
p
];
// stats the original read before trimming
config
->
getPreStats1
()
->
statRead
(
or1
);
// filter by index
if
(
mFilter
->
filterByIndex
(
or1
))
{
if
(
mOptions
->
indexFilter
.
enabled
&&
mFilter
->
filterByIndex
(
or1
))
{
delete
or1
;
continue
;
}
// stats the original read before trimming
config
->
getPreStats1
()
->
statRead
(
or1
);
// umi processing
if
(
mOptions
->
umi
.
enabled
)
...
...
This diff is collapsed.
Click to expand it.
预览
0%
请重试
或
添加新附件
.
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
保存评论
取消
想要评论请
注册
或
登录