Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Xavier Grand
ChIPster
Commits
be83f64f
Commit
be83f64f
authored
Feb 14, 2022
by
Xavier Grand
Browse files
Modif bedtools module pour fonction closest
parent
e27e275a
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/nextflow
View file @
be83f64f
...
...
@@ -16,7 +16,7 @@
# limitations under the License.
[[
"
$NXF_DEBUG
"
==
'x'
]]
&&
set
-x
NXF_VER
=
${
NXF_VER
:-
'21.
04.3
'
}
NXF_VER
=
${
NXF_VER
:-
'21.
10.6
'
}
NXF_ORG
=
${
NXF_ORG
:-
'nextflow-io'
}
NXF_HOME
=
${
NXF_HOME
:-
$HOME
/.nextflow
}
NXF_PROT
=
${
NXF_PROT
:-
'https'
}
...
...
@@ -24,6 +24,7 @@ NXF_BASE=${NXF_BASE:-$NXF_PROT://www.nextflow.io/releases}
NXF_TEMP
=
${
NXF_TEMP
:-
$TMPDIR
}
NXF_DIST
=
${
NXF_DIST
:-
$NXF_HOME
/framework
}
NXF_CLI
=
"
$0
$@
"
NXF_CLI_OPTS
=
${
NXF_CLI_OPTS
:-}
export
NXF_CLI
export
NXF_ORG
...
...
@@ -98,10 +99,10 @@ function resolve_link() {
realpath
"
$1
"
elif
command
-v
readlink
&>/dev/null
;
then
local
target
=
"
$1
"
cd
$(
dirname
$target
)
;
target
=
$(
basename
$target
)
cd
"
$(
dirname
"
$target
"
)
"
;
target
=
"
$(
basename
"
$target
"
)
"
while
[
-L
"
$target
"
]
;
do
target
=
"
$(
readlink
"
$target
"
)
"
cd
$(
dirname
$target
)
;
target
=
$(
basename
$target
)
cd
"
$(
dirname
"
$target
"
)
"
;
target
=
"
$(
basename
"
$target
"
)
"
done
echo
"
$(
cd
"
$(
dirname
"
$target
"
)
"
;
pwd
-P
)
/
$target
"
else
...
...
@@ -196,6 +197,10 @@ dockerize=''
declare -a jvmopts=()
declare -a args=("
$@
")
declare -a commands=(clone config drop help history info ls pull run view node console kuberun)
#
$NXF_CLI_OPTS
allow to pass arbitrary cli opts via the environment
# note: do not wrap with quotes because the variable can be used to specify more than on option separate by blanks
[ "
$NXF_CLI_OPTS
" ] && args+=(
$NXF_CLI_OPTS
)
cmd=''
while [[
$#
!= 0 ]]; do
case
$1
in
...
...
@@ -333,8 +338,8 @@ else
version_check="
^(1.7|1.8)
"
version_message="
Java
7 or 8
"
else
version_check="
^(1.8|9|10|11|12|13|14|15)
"
version_message="
Java
8 or later
"
version_check="
^(1.8|9|10|11|12|13|14|15
|16|17
)
"
version_message="
Java
8 or later
(up to 17)
"
fi
if [[ !
$JAVA_VER
=~
$version_check
]]; then
echo_red "
ERROR
:
Cannot find Java or it
's a wrong version -- please make sure that $version_message is installed"
...
...
@@ -345,8 +350,8 @@ else
fi
exit 1
fi
if [[ ! $JAVA_VER =~ ^(1.8|9|10|11|12|13|14|15) ]]; then
echo_yellow "NOTE: Nextflow is not tested with Java $JAVA_VER -- It'
s
recommended the use of version 8 up to 1
5
\n
"
if [[ ! $JAVA_VER =~ ^(1.8|9|10|11|12|13|14|15
|16|17
) ]]; then
echo_yellow "NOTE: Nextflow is not tested with Java $JAVA_VER -- It'
s
recommended the use of version 8 up to 1
7
\n
"
elif [[ !
$JAVA_VER
=~ ^(1.8|9|10|11) &&
$NXF_MODE
== ignite ]]; then
echo_yellow "
WARN
:
Apache Ignite executor is not tested with Java
$JAVA_VER
-- It
's recommended the use of version 8 up to 11\n"
fi
...
...
@@ -373,7 +378,7 @@ fi
[[ "$JAVA_HOME" ]] && JAVA_OPTS+=(-Dcapsule.java.home="$JAVA_HOME")
[[ "$CAPSULE_LOG" ]] && JAVA_OPTS+=(-Dcapsule.log=$CAPSULE_LOG)
[[ "$CAPSULE_RESET" ]] && JAVA_OPTS+=(-Dcapsule.reset=true)
[[ "$cmd" != "run" && "$cmd" != "node" ]] && JAVA_OPTS+=(-XX:+TieredCompilation -XX:TieredStopAtLevel=1)
[[ "$cmd" != "run" && "$cmd" != "node" ]] && JAVA_OPTS+=(-XX:+TieredCompilation -XX:TieredStopAtLevel=1
-Dcom.sun.security.enableAIAcaIssuers=true
)
[[ "$NXF_OPTS" ]] && JAVA_OPTS+=($NXF_OPTS)
[[ "$NXF_CLASSPATH" ]] && export NXF_CLASSPATH
[[ "$NXF_GRAB" ]] && export NXF_GRAB
...
...
@@ -422,18 +427,21 @@ else
LAUNCH_FILE="${NXF_LAUNCHER}/classpath-$(env_md5)"
fi
if [ -s "$LAUNCH_FILE" ] && [ "$LAUNCH_FILE" -nt "$NXF_BIN" ]; then
launcher=($(cat "$LAUNCH_FILE"))
declare -a
launcher=
"
($(cat "$LAUNCH_FILE"))
"
else
# otherwise run the capsule and get the result classpath in the '
launcher
' and save it to a file
cli=($("$JAVA_CMD" "${JAVA_OPTS[@]}" -jar "$NXF_BIN"))
[[ $? -ne 0 ]] && echo_red '
Unable
to initialize nextflow environment
' && exit 1
if [[ "$JAVA_VER" =~ ^(9|10|11|12|13|14|15) ]]; then
if [[ "$JAVA_VER" =~ ^(9|10|11|12|13|14|15
|16|17
) ]]; then
launcher=("${cli[@]:0:1}")
launcher+=(--add-opens=java.base/java.lang=ALL-UNNAMED)
launcher+=(--add-opens=java.base/java.io=ALL-UNNAMED)
launcher+=(--add-opens=java.base/java.nio=ALL-UNNAMED)
launcher+=(--add-opens=java.base/java.net=ALL-UNNAMED)
launcher+=(--add-opens=java.base/java.util=ALL-UNNAMED)
launcher+=(--add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED)
launcher+=(--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED)
launcher+=(--add-opens=java.base/java.nio.file.spi=ALL-UNNAMED)
launcher+=(--add-opens=java.base/sun.nio.ch=ALL-UNNAMED)
launcher+=(--add-opens=java.base/sun.nio.fs=ALL-UNNAMED)
...
...
@@ -442,7 +450,6 @@ else
launcher+=(--add-opens=java.base/sun.net.www.protocol.ftp=ALL-UNNAMED)
launcher+=(--add-opens=java.base/sun.net.www.protocol.file=ALL-UNNAMED)
launcher+=(--add-opens=java.base/jdk.internal.misc=ALL-UNNAMED)
launcher+=(--illegal-access=deny)
launcher+=("${cli[@]:1}")
else
launcher=("${cli[@]}")
...
...
src/nf_modules/bedtools/main.nf
View file @
be83f64f
...
...
@@ -215,6 +215,8 @@ process nearestExon_To_Peak {
script:
"""
bedtools closest -d -a ${bed} -b ${exons} > ${bed_id}_nearestExon.bed
bedtools closest -a ${exons} -b ${bed} -D a -iu > ${bed_id}_nearestExon.bed
bedtools closest -a ${exons} -b ${bed} -D a -id >> ${bed_id}_nearestExon.bed
bedtools sort -i ${bed_id}_nearestExon.bed > ${bed_id}_Distance_To_Exons_FasterDB_sorted.bed
"""
}
\ No newline at end of file
src/test.nf
View file @
be83f64f
...
...
@@ -14,7 +14,10 @@ Channel
fastq_files = fastq1
.concat(fastq2)
.groupBy
.set { fastq_files }
println(fastq_files)
/*
idx_genome = "${params.idx}*.bt2"
...
...
Write
Preview
Supports
Markdown
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