Skip to content

Commit

Permalink
large update and script bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
ktmeaton committed Jun 17, 2020
1 parent 055124f commit 7530570
Show file tree
Hide file tree
Showing 12 changed files with 1,156 additions and 1,145 deletions.
33 changes: 15 additions & 18 deletions docs/exhibit/exhibit_main.rst
Original file line number Diff line number Diff line change
Expand Up @@ -139,21 +139,14 @@ Assembly Pipeline
SRA Pipeline
^^^^^^^^^^^^^^^^^

Black Death 8291 SRA Accession

::

SRR341961

Prep tsv input from pipeline.nf
Prep tsv input from pipeline.nf, select only EAGER Ancient samples

::

nextflow run pipeline.nf \
--sqlite results/ncbimeta_db/update/latest/output/database/yersinia_pestis_db.sqlite \
--outdir test \
--sqlite_select_command_sra "\"SELECT BioSampleAccession,SRARunAccession,SRALibraryLayout,SRAFileURL FROM Master WHERE (SRARunAccession = 'SRR341961')\"" \
--max_datasets_assembly 2000 \
--outdir EAGER_Ancient \
--sqlite_select_command_sra "\"SELECT BioSampleAccession,SRARunAccession,SRALibraryLayout,SRAFileURL FROM Master WHERE (BioSampleComment LIKE '%KEEP: EAGER Ancient%')\"" \
--max_datasets_sra 2000 \
--skip_assembly_download \
--skip_sra_download \
Expand All @@ -164,11 +157,12 @@ Make directories for SRA data

::

mkdir test/sra_download;
mkdir test/sra_download/fastq;
mkdir test/sra_download/fastq/single;
mkdir test/sra_download/fastq/paired;
mkdir test/sra_download/info
outdir="EAGER_Ancient";
mkdir ${outdir}/sra_download;
mkdir ${outdir}/sra_download/fastq;
mkdir ${outdir}/sra_download/fastq/single;
mkdir ${outdir}/sra_download/fastq/paired;
mkdir ${outdir}/sra_download/info

Download single-end fastq files from the SRA

Expand Down Expand Up @@ -275,18 +269,21 @@ Repeat but include Barcelona3031 (SRARunAccession = 'ERR1368878')
--skip_reference_detect_low_complexity \
-resume ab34c580-164d-4420-9e6f-a5aa7aa1dd05

Repeat but include everything marked for EAGER
Repeat but include everything marked for EAGER Ancient

::

nextflow run pipeline.nf \
--sqlite results/ncbimeta_db/update/latest/output/database/yersinia_pestis_db.sqlite \
--outdir test \
--sqlite_select_command_sra "\"SELECT BioSampleAccession,SRARunAccession,SRALibraryLayout,SRAFileURL FROM Master WHERE (BioSampleComment LIKE '%EAGER%')\"" \
--outdir EAGER_Ancient \
--sqlite_select_command_sra "\"SELECT BioSampleAccession,SRARunAccession,SRALibraryLayout,SRAFileURL FROM Master WHERE (BioSampleComment LIKE '%KEEP: EAGER Ancient%')\"" \
--max_datasets_assembly 2000 \
--max_datasets_sra 2000 \
--skip_assembly_download \
--skip_sra_download \
--skip_reference_detect_repeats \
--skip_reference_detect_low_complexity \
-resume ab34c580-164d-4420-9e6f-a5aa7aa1dd05

| Notes:
| SAMN00715800: Split after base 75 into two separate files to maintain proper paired-end format.
17 changes: 11 additions & 6 deletions pipeline.nf
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ def helpMessage() {
DATABASE:
--ncbimeta_create Path to yaml config file to create NCBImeta DB (ncbimeta.yaml).
--ncbimeta_update Path to yaml config file to update NCBImeta DB (ncbimeta.yaml).
--ncbimeta_annot Path to text annotation file for NCBImeta DB (annot.txt).
--ncbimeta_create Path to config file to create NCBImeta DB (ncbimeta.yaml).
--ncbimeta_update Path to config file to update NCBImeta DB (ncbimeta.yaml).
--ncbimeta_annot Path to optional annotation file for NCBImeta DB (annot.txt).
--sqlite Path to sqlite database file from NCBImeta (my_db.sqlite).
Expand Down Expand Up @@ -348,7 +348,6 @@ if (!params.skip_assembly_download && (params.sqlite || ( params.ncbimeta_update

if (!params.skip_sra_download && (params.sqlite || ( params.ncbimeta_update) ) && !params.skip_sqlite_import){


process sra_download{
/*
Expand Down Expand Up @@ -380,11 +379,12 @@ if (!params.skip_sra_download && (params.sqlite || ( params.ncbimeta_update) ) &
// Shell script to execute
script:
"""
echo "TEST"
sraAcc=`cat ${sra_acc_file}`
# Disable local caching to save disk space
# vdb-config -s cache-enabled=false
# Download fastq files from the SRA
fastq-dump --outdir fastq/ --skip-technical --gzip --split-files \$sraAcc
echo "fastq-dump --outdir fastq/ --skip-technical --gzip --split-files \$sraAcc"
"""
}

Expand Down Expand Up @@ -653,7 +653,12 @@ if (!params.skip_eager && (!params.skip_sra_download) && (params.sqlite || ( par

// --------------------------------Pairwise Alignment-------------------------//

if(!params.skip_snippy_pairwise && (!params.skip_assembly_download || (!params.skip_eager && !params.skip_sra_download)) && (params.sqlite || params.ncbimeta_update) && !params.skip_sqlite_import){
if(!params.skip_snippy_pairwise &&
(!params.skip_assembly_download ||
(!params.skip_eager && !params.skip_sra_download)
) &&
(params.sqlite || params.ncbimeta_update) &&
!params.skip_sqlite_import){

process snippy_pairwise{
/*
Expand Down
2 changes: 1 addition & 1 deletion results/ncbimeta_db/update/latest/ncbimeta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ TABLES :
SEARCH_TERMS :
- Assembly : (plague OR pestis OR Yersinia pestis) AND (1900[Date - Sequences Release]:2019[Date - Sequences Release])
- BioProject : (plague OR pestis OR Yersinia pestis) AND (bioproject assembly[Filter] OR bioproject sra[Filter]) AND (1900[Registration Date]:2019[Registration Date])
- BioSample: (plague OR pestis OR Yersinia pestis) AND (biosample assembly[Filter] OR biosample sra[Filter]) AND (1900[Publication Date]:2019[Publication Date]) OR ("project_name=Rise of the Bronze Age"[attr])
- BioSample: (plague OR pestis OR Yersinia pestis) AND (biosample assembly[Filter] OR biosample sra[Filter]) AND (1900[Publication Date]:2019[Publication Date]) OR ("project_name=Rise of the Bronze Age"[attr]) OR ("Title=DA101"[attr])
- SRA : ((plague OR pestis OR Yersinia pestis) AND (genome OR genomes OR genomic OR genomics) NOT transcriptomic[Source]) AND (1900[Publication Date]:2019[Publication Date])
- Nucleotide : (plague OR pestis OR Yersinia pestis) AND WGS_MASTER[KYWD] AND nucleotide assembly[Filter]) AND (1900[Publication Date]:2019[Publication Date])
- Pubmed : (Yersinia pestis) AND (pubmed assembly[Filter] OR pubmed sra[Filter]) AND (1900[Date - Create]:2019[Date - Create])
Expand Down
Binary file not shown.
Loading

0 comments on commit 7530570

Please sign in to comment.