Skip to content
Snippets Groups Projects
Commit ed35a88e authored by Gervaise Henry's avatar Gervaise Henry :cowboy:
Browse files

Working version of getData process

parent e8e5d140
Branches
Tags
1 merge request!1Resolve "process_getData"
......@@ -25,14 +25,25 @@ outDir = params.outDir
file bdbag
output:
file("*") into dataPaths
file("**/*.R*.fastq.gz") into fastqPaths
file("**/File.csv") into filePaths
file("**/Experiment Settings.csv") into experimentSettingsPaths
file("**/Experiment.csv") into experimentPaths
script:
"""
hostname
ulimit -a
study=\$(echo "${bdbag}" | cut -d'.' -f1)
echo LOG: \${study}
unzip ${bdbag}
python3 ${baseDir}/scripts/modifyFetch.py -f \$(echo "${bdbag}" | cut -d'.' -f1)
bdbag --materialize "\$(echo "${bdbag}" | cut -d'.' -f1)"
echo LOG: bdgag unzipped
python3 ${baseDir}/scripts/modifyFetch.py --fetchFile \${study}
echo LOG: fetch file filtered for only .fastq.gz
#bdbag --materialize "\$(echo "${bdbag}" | cut -d'.' -f1)"
sh ${baseDir}/scripts/bdbagFetch.sh \${study}
echo LOG: bdbag fetched
sh ${baseDir}/scripts/renameFastq.sh \${study}
echo LOG: fastq.gz files renamed to replicate RID
"""
}
\ No newline at end of file
#!/bin
bdbag --resolve-fetch all --fetch-filter filename\$*fastq.gz $1
\ No newline at end of file
#!/bin
unzip $1
\ No newline at end of file
#!/bin
while read loc checksum fileLocation
do
file=$(echo ${fileLocation##*/})
fileName=$(echo ${file%.R*.fastq.gz})
fileExt=$(echo ${file##${fileName}.})
while IFS="," read RID Study_RID Experiment_RID Replicate_RID Caption File_Type File_Name URI File_size MD5 GEO_Archival_URL dbGaP_Accession_ID Processed Notes Principal_Investigator Consortium Release_Date RCT RMT Legacy_File_RID GUDMAP_NGF_OID GUDMAP_NGS_OID
do
if [ ${file} == ${File_Name} ]
then
find . -type f -name ${file} -execdir mv {} ${Replicate_RID}.${fileExt} ';'
fi
done < $1/data/File.csv
done < $1/fetch.txt
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment