Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libhts
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Blaise LI
libhts
Commits
6d74c7a4
Commit
6d74c7a4
authored
5 years ago
by
Blaise Li
Browse files
Options
Downloads
Patches
Plain Diff
Trying to set memory limits.
niceload may not be the appropriate way.
parent
6267d53a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libhts/libhts.py
+1
-1
1 addition, 1 deletion
libhts/libhts.py
scripts/sam2indexedbam.sh
+13
-4
13 additions, 4 deletions
scripts/sam2indexedbam.sh
with
14 additions
and
5 deletions
libhts/libhts.py
+
1
−
1
View file @
6d74c7a4
...
...
@@ -239,7 +239,7 @@ bowtie2_function_selector = {
def
make_seeding_function
(
seeding_string
):
"""
Generates a function that computes the seeding pattern given a
string representing bowtie2 seeding settings (-L and -i options).
>>>
make_seeding_function
(
"
-L 6 -i S,1,0.8
"
)(
18
)
[[
0
,
6
],
[
4
,
10
],
[
8
,
14
],
[
12
,
18
]]
"""
...
...
This diff is collapsed.
Click to expand it.
scripts/sam2indexedbam.sh
+
13
−
4
View file @
6d74c7a4
...
...
@@ -52,7 +52,6 @@ else
filter
=
"-F 4"
fi
# Test environment variable THREADS
if
[[
${
SAMTOOLS_THREADS
}
]]
then
threads_option
=
"--threads
${
SAMTOOLS_THREADS
}
"
...
...
@@ -60,17 +59,27 @@ else
threads_option
=
""
fi
if
[[
${
SAMTOOLS_MEM
}
]]
then
mem_option
=
"-m
${
SAMTOOLS_MEM
}
"
else
mem_option
=
""
fi
if
[
-e
${
SAM
}
]
then
# -u: output uncompressed bam, to save time when piping to samtools sort
samtools view
${
threads_option
}
-u
${
filter
}
${
SAM
}
| niceload
--mem
500M samtools
sort
${
threads_option
}
-T
${
tmpdir
}
-o
${
SAM
%.
${
ext
}}
_sorted.bam -
||
error_exit
"samtools sort failed"
#samtools view ${threads_option} -u ${filter} ${SAM} | niceload --mem 500M samtools sort ${mem_option} ${threads_option} -T ${tmpdir} -o ${SAM%.${ext}}_sorted.bam - || error_exit "samtools sort failed"
samtools view
${
threads_option
}
-u
${
filter
}
${
SAM
}
| samtools
sort
${
mem_option
}
${
threads_option
}
-T
${
tmpdir
}
-o
${
SAM
%.
${
ext
}}
_sorted.bam -
||
error_exit
"samtools sort failed"
#cat ${SAM} | samtools view ${threads_option} -u ${filter} - | samtools sort ${threads_option} -o ${SAM%.${ext}}_sorted.bam - || error_exit "samtools sort failed"
elif
[
-e
${
SAM
}
.gz
]
then
zcat
${
SAM
}
.gz | samtools view
${
threads_option
}
-u
${
filter
}
- | niceload
--mem
500M samtools
sort
${
threads_option
}
-T
${
tmpdir
}
-o
${
SAM
%.
${
ext
}}
_sorted.bam -
||
error_exit
"samtools sort failed"
#zcat ${SAM}.gz | samtools view ${threads_option} -u ${filter} - | niceload --mem 500M samtools sort ${mem_option} ${threads_option} -T ${tmpdir} -o ${SAM%.${ext}}_sorted.bam - || error_exit "samtools sort failed"
zcat
${
SAM
}
.gz | samtools view
${
threads_option
}
-u
${
filter
}
- | samtools
sort
${
mem_option
}
${
threads_option
}
-T
${
tmpdir
}
-o
${
SAM
%.
${
ext
}}
_sorted.bam -
||
error_exit
"samtools sort failed"
elif
[
-e
${
SAM
}
.bz2
]
then
bzcat
${
SAM
}
.bz2 | samtools view
${
threads_option
}
-u
${
filter
}
- | niceload
--mem
500M samtools
sort
${
threads_option
}
-T
${
tmpdir
}
-o
${
SAM
%.
${
ext
}}
_sorted.bam -
||
error_exit
"samtools sort failed"
#bzcat ${SAM}.bz2 | samtools view ${threads_option} -u ${filter} - | niceload --mem 500M samtools sort ${mem_option} ${threads_option} -T ${tmpdir} -o ${SAM%.${ext}}_sorted.bam - || error_exit "samtools sort failed"
bzcat
${
SAM
}
.bz2 | samtools view
${
threads_option
}
-u
${
filter
}
- | samtools
sort
${
mem_option
}
${
threads_option
}
-T
${
tmpdir
}
-o
${
SAM
%.
${
ext
}}
_sorted.bam -
||
error_exit
"samtools sort failed"
else
echo
"
${
SAM
}
not found, neither .gz or .bz2 versions."
echo
"Aborting."
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment