Skip to content

Commit

Permalink
upload stats in ftp
Browse files Browse the repository at this point in the history
  • Loading branch information
ens-ftricomi committed Apr 28, 2024
1 parent 30fac83 commit 326559e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
1 change: 1 addition & 0 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ params {
jdbcUrl = "jdbc:mysql://${params.host}:${params.port}/${params.dbname}"

ncbiBaseUrl="https://api.ncbi.nlm.nih.gov/datasets/v2alpha/genome/accession/"
readme="${projectDir}/../data/README.txt"
//production_ftp_dir= "/nfs/production/flicek/ensembl/production/ensemblftp/rapid-release/species/"
production_ftp_dir= "/nfs/production/flicek/ensembl/genebuild/genebuild_virtual_user/test_fra/"
project = 'ensembl'
Expand Down
File renamed without changes.
9 changes: 4 additions & 5 deletions pipelines/nextflow/modules/copy_output_to_ensembl_ftp.nf
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,15 @@ process COPY_OUTPUT_TO_ENSEMBL_FTP {
species=scientific_name.toLowerCase()
gca_string = gca.toLowerCase().replaceAll(/\./, "v").replaceAll(/_/, "")
publish_dir =scientific_name +'/'+gca+'/'+getMetaValue(dbname, "species.annotation_source")[0].meta_value.toString()
statistics_files = "${params.outDir}/$publish_dir/statistics/*summary.txt"
ftp_stats = "${params.production_ftp_dir}/$publish_dir/statistics"
ftp_path = "${params.production_ftp_dir}/$scientific_name"
"""
sudo -u genebuild mkdir -p $ftp_stats; \
sudo -u genebuild rsync -ahvW $summary_file $ftp_stats && rsync -avhc $summary_file $ftp_stats; \
sudo -u genebuild cp ${params.readme} $ftp_stats;
sudo -u genebuild cp $statistics_files $ftp_stats; \
sudo -u genebuild chmod 775 $ftp_path/* -R;
sudo -u genebuild chgrp ensemblftp $ftp_path/* -R;
"""
//sudo -u genebuild find #production_ftp_dir#/species/Urophycis_tenuis -user genebuild -exec chmod g+w {} \;
//sudo -u genebuild find "$ftp_path" -user genebuild -exec chmod g+w {} ; \
//sudo -u genebuild find "$ftp_path" -user genebuild -exec chgrp -R ensemblftp {} \;
//sudo -u genebuild rsync -ahvW $summary_file $ftp_stats && rsync -avhc $summary_file $ftp_stats; \
}
8 changes: 4 additions & 4 deletions pipelines/nextflow/modules/omark/omark_output.nf
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ include { getMetaValue } from '../utils.nf'
process OMARK_OUTPUT {
tag "omark_output:$gca"
label 'default'
//publishDir "${params.outDir}/$publish_dir/statistics", mode: 'copy'
storeDir "${params.outDir}/$publish_dir/statistics"
publishDir "${params.outDir}/$publish_dir/statistics", mode: 'copy'
//storeDir "${params.outDir}/$publish_dir/statistics/"

input:
tuple val(gca), val(dbname), val(publish_dir), path(summary_file), val(omark_dir)
Expand All @@ -37,8 +37,8 @@ process OMARK_OUTPUT {
gca_string = gca.toLowerCase().replaceAll(/\./, "v").replaceAll(/_/, "")
//def summary_name = summary_file
summary_name = [species, gca_string, "omark", "proteins_detailed_summary.txt"].join("_")
//summary_file= summary_name
omark_file = task.workDir.resolve(summary_name+'_'+summary_file)
summary_file= summary_name
//omark_file = task.workDir.resolve(summary_name+'_'+summary_file)
//summary_file.renameTo(new File(summary_file.getParent(), summary_name)) "proteins_detailed_summary.txt"
//"""
//cp $summary_file $summary_name
Expand Down

0 comments on commit 326559e

Please sign in to comment.