Skip to content

Commit

Permalink
Update normalize_bam CI function and checksums
Browse files Browse the repository at this point in the history
  • Loading branch information
emi80 committed Aug 31, 2020
1 parent 4754aef commit 7e23dd1
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 41 deletions.
22 changes: 11 additions & 11 deletions .circ
Expand Up @@ -9,7 +9,7 @@ _ci_usage() {
clean remove the temporary directory used for vaildation

Notes:
If '\$CI_DIR' is in the Nextflow asset folder the pipeline is run using the GitHub repository
If '\$CI_DIR' is in the Nextflow asset folder the pipeline is run using the GitHub repository
to allow to change revision from the comand line, e.g.:

CI_DIR=~/.nextflow/assets/guigolab/grape-nf ci test -r v0.4.1
Expand All @@ -23,12 +23,12 @@ _ci_canonicalize_path() {
else
_ci_canonicalize_file_path "$1"
fi
}
}

# Get canonical path of a directory
_ci_canonicalize_dir_path() {
(cd "$1" 2>/dev/null && pwd -P)
}
(cd "$1" 2>/dev/null && pwd -P)
}

# Get canonical path of a file
_ci_canonicalize_file_path() {
Expand All @@ -38,11 +38,11 @@ _ci_canonicalize_file_path() {
(cd "$dir" 2>/dev/null && printf '%s/%s\n' "$(pwd -P)" "$file")
}

# Check that Nextflow is installed and download it to the current
# Check that Nextflow is installed and download it to the current
# folder otherwise
_ci_setup_nxf() {
if ! nextflow &>/dev/null; then
export PATH=$PWD:$PATH
export PATH=$PWD:$PATH
if [ ! -x nextflow ]; then
curl -fsSL get.nextflow.io | bash && chmod +x nextflow
fi
Expand All @@ -51,10 +51,10 @@ _ci_setup_nxf() {

# Get the content of a BAM file for checksum
_ci_normalize_bam() {
docker run --rm -v $1:$1 -w $PWD grapenf/samtools:1.3.1 bash -c "samtools view -h $2 | grep -v '@CO\|@PG' | samtools view -Sb - > $(basename $2) 2>/dev/null"
docker run --rm -v $CI_DIR:$CI_DIR -v $1:$1 -w $PWD grapenf/samtools:1.3.1 bash -c "samtools view -h $2 | grep -v '@CO\|@PG' | LC_ALL=C sort > $(basename $2) 2>/dev/null"
}

# Get file to the CI output directory either by creating a symlink
# Get file to the CI output directory either by creating a symlink
# or normalizing a BAM file
_ci_get_file() {
local baseDir=$1
Expand Down Expand Up @@ -95,7 +95,7 @@ _ci_check() {
(mkdir -p $CI_OUTDIR && cd $CI_OUTDIR
echo $CI_PROFILE > .ci_profile
cut -f 3 ../pipeline.db | while read f
do
do
_ci_get_file $(_ci_canonicalize_path ..) $f
done
md5sum -c ${CI_DIR}/data/$CI_PROFILE.md5)
Expand Down Expand Up @@ -141,7 +141,7 @@ ci() {
test)
shift
(_ci_test "$@");;
*)
*)
_ci_usage;;
esac
}
Expand All @@ -151,4 +151,4 @@ CI_DIR=$(_ci_get_script_dir $0)
CI_LOG=pipeline-ci.log
CI_PROFILE="starrsem"
CI_OUTDIR="checksum"
CI_RUNOPTS=("-process.errorStrategy=terminate" "-with-docker")
CI_RUNOPTS=("-process.errorStrategy=terminate" "-with-docker")
6 changes: 3 additions & 3 deletions data/gemflux.md5
@@ -1,21 +1,21 @@
60e3b244d81b235f4da09c6d0a216413 sample1.contigs.bed
9b31baf13928228a90c34ed11100ea5a sample1.genes.gff
092b15fa6e2f0b16bbe3ac5a77706f39 sample1.isoforms.gtf
cfe300e64671bbdee6652ce92ae5a053 sample1_m4_n10_toGenome.bam
ccee0df1e95b1a37fdde16f5b84911ca sample1_m4_n10_toGenome.bam
4ec7f9268c5dcef3b537c88169f89e19 sample1.minusRaw.bw
7ae99c171a210009538ddcd0ca016d6c sample1.plusRaw.bw
3aab7ddeea72e1e9c383ef99e8cb6c51 sample1_stats.json
80c3892ceee10325d96ccab6f1e64557 sample2.contigs.bed
13a9a9480dbff4e9e70d60b46ddd9e89 sample2.genes.gff
8941bc59f0e957058c4535c9f33977cb sample2.isoforms.gtf
63ae7df24c69cc8e6cc17ad81cc36331 sample2_m4_n10_toGenome.bam
f0233b16d583f683b45bede3b23f4afa sample2_m4_n10_toGenome.bam
4c852dab27a29718d4393b9514b6ca41 sample2.minusRaw.bw
e66ef8cf062e662d5975bef6cab7a645 sample2.plusRaw.bw
fd49b1c19e153c8ee112609e1ce757a0 sample2_stats.json
89f19344b1f1a346a105f2b3f9443f9e sample3.contigs.bed
74f9de8e31ff2c24bc45af5f8ec73530 sample3.genes.gff
1a039c489fdeb3e0ab4ff768424b5997 sample3.isoforms.gtf
7a342ac43535d6f56492ea081f956779 sample3_m4_n10_toGenome.bam
5f321238975bdde3bd81aee70ccb1f77 sample3_m4_n10_toGenome.bam
db10a50bb7eebec0f3421f4460d4cae8 sample3.minusRaw.bw
235e2d65c856c969048e432234c04ff4 sample3.plusRaw.bw
77c72bef6f1410e33c90dbc01697fffc sample3_stats.json
12 changes: 6 additions & 6 deletions data/ihec.md5
@@ -1,8 +1,8 @@
30245cd4c1b37b323a1428e6a79b6b46 sample1.contigs.bed
5dd20d4ee5a2c161536ef43460c3537a sample1.genes.results
d2ce2685d81e4d3cafd42ff91284139c sample1.isoforms.results
a79f77a6ce5b6c1f47c38b1a038a4a50 sample1_m4_n10_toGenome.markdup.bam
33428e053dfb80aab625e422cb45aec6 sample1_m4_n10_toTranscriptome.bam
2dcd9d3a6981957cf9aee98e33658161 sample1_m4_n10_toGenome.markdup.bam
8d88fb9910efc782292322ab22ebff8c sample1_m4_n10_toTranscriptome.bam
2cbe0ae71670342704ecfbda2d64ac25 sample1_stats.json
b8c92ab59a2366efef9342c762ad6aa3 sample1.Unique.minusRaw.bw
5a4ed2441202cb0ee4e1a8ce9842d7d4 sample1.UniqueMultiple.minusRaw.bw
Expand All @@ -11,8 +11,8 @@ b461f2bde79dfeadcfbf49762937d584 sample1.Unique.plusRaw.bw
982947ea8922d0751a3e92407a14fe69 sample2.contigs.bed
134b79ef252a55eac18a282f990d881c sample2.genes.results
9935f541a76a39c53a3909f350fabb1f sample2.isoforms.results
fd65d80492ed977584d287b76df9d4fe sample2_m4_n10_toGenome.markdup.bam
db09bcc2983231ac2dca933837d1bdb5 sample2_m4_n10_toTranscriptome.bam
356564de835d5469c57eecb450b53fd3 sample2_m4_n10_toGenome.markdup.bam
001e4af88d8713bd610492ccf859f128 sample2_m4_n10_toTranscriptome.bam
5b99c51cc11b8dc0d0f41566a1459ca5 sample2_stats.json
99858805585a1dae5a247e39e5bb3943 sample2.Unique.minusRaw.bw
b5197e0220965ebbda74b7d3b77558d7 sample2.UniqueMultiple.minusRaw.bw
Expand All @@ -21,8 +21,8 @@ b5197e0220965ebbda74b7d3b77558d7 sample2.UniqueMultiple.minusRaw.bw
89f19344b1f1a346a105f2b3f9443f9e sample3.contigs.bed
568855cd154369988f0e9120660dcea6 sample3.genes.results
a2ddfd7d7919830d69f941176ddff86f sample3.isoforms.results
b23e2d5f4a21ce71c27a82b768033883 sample3_m4_n10_toGenome.markdup.bam
6be11c68c6bfe99900982a848a7989bb sample3_m4_n10_toTranscriptome.bam
11e62a11f474ffa979ff9417c8d6c46b sample3_m4_n10_toGenome.markdup.bam
aa9845bc886d5f5183d123b481a22404 sample3_m4_n10_toTranscriptome.bam
93ac7fc04304459ca7f85472ab5b700f sample3_stats.json
d7832747e6cc087ae631d22895adeac0 sample3.Unique.minusRaw.bw
0c15bda07bcb2f2424925b27f6394656 sample3.UniqueMultiple.minusRaw.bw
Expand Down
12 changes: 6 additions & 6 deletions data/markdup.md5
@@ -1,8 +1,8 @@
30245cd4c1b37b323a1428e6a79b6b46 sample1.contigs.bed
5dd20d4ee5a2c161536ef43460c3537a sample1.genes.results
d2ce2685d81e4d3cafd42ff91284139c sample1.isoforms.results
7991bd2774d8a9b6001c97fe45ab70e4 sample1_m4_n10_toGenome.markdup.bam
33428e053dfb80aab625e422cb45aec6 sample1_m4_n10_toTranscriptome.bam
2dcd9d3a6981957cf9aee98e33658161 sample1_m4_n10_toGenome.markdup.bam
8d88fb9910efc782292322ab22ebff8c sample1_m4_n10_toTranscriptome.bam
2cbe0ae71670342704ecfbda2d64ac25 sample1_stats.json
b8c92ab59a2366efef9342c762ad6aa3 sample1.Unique.minusRaw.bw
5a4ed2441202cb0ee4e1a8ce9842d7d4 sample1.UniqueMultiple.minusRaw.bw
Expand All @@ -11,8 +11,8 @@ b461f2bde79dfeadcfbf49762937d584 sample1.Unique.plusRaw.bw
982947ea8922d0751a3e92407a14fe69 sample2.contigs.bed
134b79ef252a55eac18a282f990d881c sample2.genes.results
9935f541a76a39c53a3909f350fabb1f sample2.isoforms.results
cae7766b2971d54dd96612385140f0c0 sample2_m4_n10_toGenome.markdup.bam
db09bcc2983231ac2dca933837d1bdb5 sample2_m4_n10_toTranscriptome.bam
356564de835d5469c57eecb450b53fd3 sample2_m4_n10_toGenome.markdup.bam
001e4af88d8713bd610492ccf859f128 sample2_m4_n10_toTranscriptome.bam
5b99c51cc11b8dc0d0f41566a1459ca5 sample2_stats.json
99858805585a1dae5a247e39e5bb3943 sample2.Unique.minusRaw.bw
b5197e0220965ebbda74b7d3b77558d7 sample2.UniqueMultiple.minusRaw.bw
Expand All @@ -21,8 +21,8 @@ b5197e0220965ebbda74b7d3b77558d7 sample2.UniqueMultiple.minusRaw.bw
89f19344b1f1a346a105f2b3f9443f9e sample3.contigs.bed
568855cd154369988f0e9120660dcea6 sample3.genes.results
a2ddfd7d7919830d69f941176ddff86f sample3.isoforms.results
b23e2d5f4a21ce71c27a82b768033883 sample3_m4_n10_toGenome.markdup.bam
6be11c68c6bfe99900982a848a7989bb sample3_m4_n10_toTranscriptome.bam
11e62a11f474ffa979ff9417c8d6c46b sample3_m4_n10_toGenome.markdup.bam
aa9845bc886d5f5183d123b481a22404 sample3_m4_n10_toTranscriptome.bam
93ac7fc04304459ca7f85472ab5b700f sample3_stats.json
d7832747e6cc087ae631d22895adeac0 sample3.Unique.minusRaw.bw
0c15bda07bcb2f2424925b27f6394656 sample3.UniqueMultiple.minusRaw.bw
Expand Down
12 changes: 6 additions & 6 deletions data/rmdup.md5
@@ -1,8 +1,8 @@
5afcc490a6b5717cf42c42ff093951be sample1.contigs.bed
5dd20d4ee5a2c161536ef43460c3537a sample1.genes.results
d2ce2685d81e4d3cafd42ff91284139c sample1.isoforms.results
1ff1cfff22531c949f2db0b69488a03c sample1_m4_n10_toGenome.markdup.bam
33428e053dfb80aab625e422cb45aec6 sample1_m4_n10_toTranscriptome.bam
09eb9f6d52dc4decd5f78c41a7cee613 sample1_m4_n10_toGenome.markdup.bam
8d88fb9910efc782292322ab22ebff8c sample1_m4_n10_toTranscriptome.bam
788498a850584e3ab55218e626e032fe sample1_stats.json
cff57373d6acc0a902058cadf06c17b2 sample1.Unique.minusRaw.bw
f726544d2bd353c08c28adf3d81240b2 sample1.UniqueMultiple.minusRaw.bw
Expand All @@ -11,8 +11,8 @@ c59cb9486bd2d3abe21d123e538e02b0 sample1.UniqueMultiple.plusRaw.bw
bfc9a9c5501bbb0d1d60ee2b47a53916 sample2.contigs.bed
134b79ef252a55eac18a282f990d881c sample2.genes.results
9935f541a76a39c53a3909f350fabb1f sample2.isoforms.results
f762079c74bc01b3654b6cb2d62c1f1c sample2_m4_n10_toGenome.markdup.bam
db09bcc2983231ac2dca933837d1bdb5 sample2_m4_n10_toTranscriptome.bam
66bf139ee0e17a4ac24eb8ea58112c30 sample2_m4_n10_toGenome.markdup.bam
001e4af88d8713bd610492ccf859f128 sample2_m4_n10_toTranscriptome.bam
b50b1fbf7a9d04bd78a1d5427f7356ae sample2_stats.json
7362829e0b4279f23a13c7e5546bd134 sample2.Unique.minusRaw.bw
f1a2be88768194dfa2ad4cf3f3cfe496 sample2.UniqueMultiple.minusRaw.bw
Expand All @@ -21,8 +21,8 @@ d14e02cf22f15c9d49af61d8fda1718a sample2.Unique.plusRaw.bw
a14c5872ab9a2dcf55a70a7b17f449ea sample3.contigs.bed
568855cd154369988f0e9120660dcea6 sample3.genes.results
a2ddfd7d7919830d69f941176ddff86f sample3.isoforms.results
1b979a874a8c1f5068a305dc6a216618 sample3_m4_n10_toGenome.markdup.bam
6be11c68c6bfe99900982a848a7989bb sample3_m4_n10_toTranscriptome.bam
a17775628cbaae90ec26687f98b417c5 sample3_m4_n10_toGenome.markdup.bam
aa9845bc886d5f5183d123b481a22404 sample3_m4_n10_toTranscriptome.bam
bc7ecf0db0ed5b035fac07f521849de6 sample3_stats.json
811d8dde82e960f098854f2384507778 sample3.Unique.minusRaw.bw
8e197ae04a0f9b4ddee9ad7eaa43e396 sample3.UniqueMultiple.minusRaw.bw
Expand Down
6 changes: 3 additions & 3 deletions data/starflux.md5
@@ -1,7 +1,7 @@
30245cd4c1b37b323a1428e6a79b6b46 sample1.contigs.bed
94884593db9b76caa87bf2c3b09c4671 sample1.genes.gff
c3cfd6d32e8bd3258bb1cb6127157a99 sample1.isoforms.gtf
e1cf9e315706bf0eb08258d503a36274 sample1_m4_n10_toGenome.bam
62dcbc3b66c603e998a7e1f564e3743a sample1_m4_n10_toGenome.bam
6936e714ac8f98c951ba52ec8fd0e441 sample1_stats.json
37aa4ae5af33a81f8775440bbfd21fba sample1.Unique.minusRaw.bw
ffce7ba84865e21df6bf8fb849822545 sample1.UniqueMultiple.minusRaw.bw
Expand All @@ -10,7 +10,7 @@ b2d459ec4663d01769e97352c2b59de2 sample1.UniqueMultiple.plusRaw.bw
982947ea8922d0751a3e92407a14fe69 sample2.contigs.bed
342fe787dd63b159919b99f9223d00c9 sample2.genes.gff
f2b8f02792b460063ab3dd9d74a0e460 sample2.isoforms.gtf
25d835f345f074934e63c5b6d87a77ab sample2_m4_n10_toGenome.bam
c3b825e524cd9143a85c46d3807a7c87 sample2_m4_n10_toGenome.bam
0295d0759fbf5a2df7035f8ff5333e5e sample2_stats.json
1de3717e5641e2eccd5f1c939c606f3d sample2.Unique.minusRaw.bw
3da795eb593185afb75c9aea84c82b87 sample2.UniqueMultiple.minusRaw.bw
Expand All @@ -19,7 +19,7 @@ c7ad3d6214f976735c7e621b9f78d323 sample2.UniqueMultiple.plusRaw.bw
89f19344b1f1a346a105f2b3f9443f9e sample3.contigs.bed
74f9de8e31ff2c24bc45af5f8ec73530 sample3.genes.gff
1a039c489fdeb3e0ab4ff768424b5997 sample3.isoforms.gtf
7a342ac43535d6f56492ea081f956779 sample3_m4_n10_toGenome.bam
5f321238975bdde3bd81aee70ccb1f77 sample3_m4_n10_toGenome.bam
77c72bef6f1410e33c90dbc01697fffc sample3_stats.json
1363d4e278c9024433c2901996ab730a sample3.Unique.minusRaw.bw
2deb1fd284c866ff5faec6ceba351d56 sample3.UniqueMultiple.minusRaw.bw
Expand Down
12 changes: 6 additions & 6 deletions data/starrsem.md5
@@ -1,8 +1,8 @@
30245cd4c1b37b323a1428e6a79b6b46 sample1.contigs.bed
5dd20d4ee5a2c161536ef43460c3537a sample1.genes.results
d2ce2685d81e4d3cafd42ff91284139c sample1.isoforms.results
e1cf9e315706bf0eb08258d503a36274 sample1_m4_n10_toGenome.bam
33428e053dfb80aab625e422cb45aec6 sample1_m4_n10_toTranscriptome.bam
62dcbc3b66c603e998a7e1f564e3743a sample1_m4_n10_toGenome.bam
8d88fb9910efc782292322ab22ebff8c sample1_m4_n10_toTranscriptome.bam
6936e714ac8f98c951ba52ec8fd0e441 sample1_stats.json
37aa4ae5af33a81f8775440bbfd21fba sample1.Unique.minusRaw.bw
ffce7ba84865e21df6bf8fb849822545 sample1.UniqueMultiple.minusRaw.bw
Expand All @@ -11,8 +11,8 @@ b2d459ec4663d01769e97352c2b59de2 sample1.UniqueMultiple.plusRaw.bw
982947ea8922d0751a3e92407a14fe69 sample2.contigs.bed
134b79ef252a55eac18a282f990d881c sample2.genes.results
9935f541a76a39c53a3909f350fabb1f sample2.isoforms.results
25d835f345f074934e63c5b6d87a77ab sample2_m4_n10_toGenome.bam
db09bcc2983231ac2dca933837d1bdb5 sample2_m4_n10_toTranscriptome.bam
c3b825e524cd9143a85c46d3807a7c87 sample2_m4_n10_toGenome.bam
001e4af88d8713bd610492ccf859f128 sample2_m4_n10_toTranscriptome.bam
0295d0759fbf5a2df7035f8ff5333e5e sample2_stats.json
1de3717e5641e2eccd5f1c939c606f3d sample2.Unique.minusRaw.bw
3da795eb593185afb75c9aea84c82b87 sample2.UniqueMultiple.minusRaw.bw
Expand All @@ -21,8 +21,8 @@ c7ad3d6214f976735c7e621b9f78d323 sample2.UniqueMultiple.plusRaw.bw
89f19344b1f1a346a105f2b3f9443f9e sample3.contigs.bed
568855cd154369988f0e9120660dcea6 sample3.genes.results
a2ddfd7d7919830d69f941176ddff86f sample3.isoforms.results
7a342ac43535d6f56492ea081f956779 sample3_m4_n10_toGenome.bam
6be11c68c6bfe99900982a848a7989bb sample3_m4_n10_toTranscriptome.bam
5f321238975bdde3bd81aee70ccb1f77 sample3_m4_n10_toGenome.bam
aa9845bc886d5f5183d123b481a22404 sample3_m4_n10_toTranscriptome.bam
77c72bef6f1410e33c90dbc01697fffc sample3_stats.json
1363d4e278c9024433c2901996ab730a sample3.Unique.minusRaw.bw
2deb1fd284c866ff5faec6ceba351d56 sample3.UniqueMultiple.minusRaw.bw
Expand Down

0 comments on commit 7e23dd1

Please sign in to comment.