Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix HEREDOC/versions.yml #71

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/local/annotation/full_annotation/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ process ANNOTATION {

cat <<-END_VERSIONS > versions.yml
"${task.process}":
awk: \$(awk --version | head -n1 | cut -d' ' -f3 | sed 's/,//g' )
bedtools: \$(bedtools --version | sed -e "s/bedtools v//g")
busybox: \$(busybox | head -1)
ucsc: $VERSION
END_VERSIONS
"""
Expand Down
6 changes: 3 additions & 3 deletions modules/local/ciriquant/filter/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ process CIRIQUANT_FILTER {
def VERSION = '1.3.4'
"""
grep -v "#" ${prefix}.gtf | awk '{print \$14}' | cut -d '.' -f1 > counts
grep -v "#" ${prefix}.gtf | awk -v OFS="\t" '{print \$1,\$4,\$5,\$7}' > ${prefix}.tmp
grep -v "#" ${prefix}.gtf | awk -v OFS="\\t" '{print \$1,\$4,\$5,\$7}' > ${prefix}.tmp
paste ${prefix}.tmp counts > ${prefix}_unfilt.bed

awk '{if(\$5 >= ${bsj_reads}) print \$0}' ${prefix}_unfilt.bed > ${prefix}_filt.bed
grep -v '^\$' ${prefix}_filt.bed > ${prefix}_ciriquant

awk -v OFS="\t" '{\$2-=1;print}' ${prefix}_ciriquant > ${prefix}_ciriquant.bed
awk -v OFS="\\t" '{\$2-=1;print}' ${prefix}_ciriquant > ${prefix}_ciriquant.bed
rm ${prefix}.gtf

awk -v OFS="\t" '{print \$1, \$2, \$3, \$1":"\$2"-"\$3":"\$4, \$5, \$4}' ${prefix}_ciriquant.bed > ${prefix}_ciriquant_circs.bed
awk -v OFS="\\t" '{print \$1, \$2, \$3, \$1":"\$2"-"\$3":"\$4, \$5, \$4}' ${prefix}_ciriquant.bed > ${prefix}_ciriquant_circs.bed

cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down
2 changes: 1 addition & 1 deletion modules/local/ciriquant/yml/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ process CIRIQUANT_YML {
SAMTOOLS=`which samtools`

touch travis.yml
printf "name: ciriquant\ntools:\n bwa: \$BWA\n hisat2: \$HISAT2\n stringtie: \$STRINGTIE\n samtools: \$SAMTOOLS\n\nreference:\n fasta: ${fasta_path}\n gtf: ${gtf_path}\n bwa_index: ${bwa_path}/${bwa_prefix}\n hisat_index: ${hisat2_path}/${hisat2_prefix}" >> travis.yml
printf "name: ciriquant\\ntools:\\n bwa: \$BWA\\n hisat2: \$HISAT2\\n stringtie: \$STRINGTIE\\n samtools: \$SAMTOOLS\\n\\nreference:\\n fasta: ${fasta_path}\\n gtf: ${gtf_path}\\n bwa_index: ${bwa_path}/${bwa_prefix}\\n hisat_index: ${hisat2_path}/${hisat2_prefix}" >> travis.yml
"""
}
6 changes: 5 additions & 1 deletion modules/local/stringtie/prepde/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ process STRINGTIE_PREPDE {

script:
"""
for file in \$(ls *.gtf); do sample_id=\${file%".transcripts.gtf"}; touch samples.txt; printf "\$sample_id\t\$file\n" >> samples.txt ; done
for file in \$(ls *.gtf); do
sample_id=\${file%".transcripts.gtf"}
touch samples.txt
printf "\$sample_id\\t\$file\\n" >> samples.txt
done

prepDE.py -i samples.txt

Expand Down