Mercurial > repos > galaxytrakr > aws_sra
comparison aws_sra.xml @ 7:3529ce6bcde7 draft
planemo upload for repository https://github.com/CFSAN-Biostatistics/galaxytrakr-tools commit 74cea66080315c44e81547de5fe02f046bcaa1f0
| author | galaxytrakr |
|---|---|
| date | Mon, 23 Mar 2026 18:32:46 +0000 |
| parents | 8c60cd4c0ca7 |
| children | ef51d44623c2 |
comparison
equal
deleted
inserted
replaced
| 6:8c60cd4c0ca7 | 7:3529ce6bcde7 |
|---|---|
| 1 <tool id="aws_sra" name="NCBI SRA AWS Fetch" version="0.3.0+gt_0.6" profile="23.0"> | 1 <tool id="aws_sra" name="NCBI SRA AWS Fetch" version="0.3.0+gt_0.7" profile="23.0"> |
| 2 <description>Fetch SRA data files from NCBI's public AWS S3 buckets</description> | 2 <description>Fetch SRA data files from NCBI's public AWS S3 buckets</description> |
| 3 | 3 |
| 4 <requirements> | 4 <requirements> |
| 5 <requirement type="package" version="2.34.8">awscli</requirement> | 5 <requirement type="package" version="2.34.8">awscli</requirement> |
| 6 <requirement type="package" version="3.2.1">sra-tools</requirement> | 6 <requirement type="package" version="3.2.1">sra-tools</requirement> |
| 47 | 47 |
| 48 ## ── FASTQ DUMP mode (sra-pub-run-odp only) ─────────────────────────────── | 48 ## ── FASTQ DUMP mode (sra-pub-run-odp only) ─────────────────────────────── |
| 49 #elif $action.mode == 'fastq_dump' | 49 #elif $action.mode == 'fastq_dump' |
| 50 #set $acc = $action.accession.strip() | 50 #set $acc = $action.accession.strip() |
| 51 | 51 |
| 52 ## 1. Download the .sra file from S3 | 52 ## 1. Download the file from S3 |
| 53 mkdir -p sra_cache && | 53 mkdir -p sra_cache && |
| 54 aws s3 cp | 54 aws s3 cp \ |
| 55 --no-sign-request | 55 --no-sign-request \ |
| 56 '${s3_base}/sra/${acc}/${acc}.sra' | 56 '${s3_base}/sra/${acc}/${acc}' \ |
| 57 ./sra_cache/${acc}.sra && | 57 ./sra_cache/${acc} && |
| 58 | 58 |
| 59 ## 2. Convert with fasterq-dump --split-files. | 59 ## 2. Convert with fasterq-dump (CORRECTED: uses extensionless file) |
| 60 ## Paired runs → <acc>_1.fastq + <acc>_2.fastq | |
| 61 ## Single runs → <acc>.fastq (no _1/_2 suffix) | |
| 62 ## We always use --split-files; single-end runs simply produce one file. | |
| 63 mkdir -p fastq_out && | 60 mkdir -p fastq_out && |
| 64 fasterq-dump | 61 fasterq-dump \ |
| 65 ./sra_cache/${acc}.sra | 62 ./sra_cache/${acc} \ |
| 66 --outdir ./fastq_out | 63 --outdir ./fastq_out \ |
| 67 --temp . | 64 --temp . \ |
| 68 --threads \${GALAXY_SLOTS:-4} | 65 --threads \${GALAXY_SLOTS:-4} \ |
| 69 --split-files | 66 --split-files |
| 70 && | 67 && |
| 71 | 68 |
| 72 ## 3. Compress with pigz (fasterq-dump does not gzip natively) | 69 ## 3. Compress with pigz |
| 73 pigz -p \${GALAXY_SLOTS:-4} ./fastq_out/*.fastq && | 70 pigz -p \${GALAXY_SLOTS:-4} ./fastq_out/*.fastq && |
| 74 | 71 |
| 75 ## 4. Stage outputs | 72 ## 4. Stage outputs |
| 76 #if $action.layout == 'paired' | 73 #if $action.layout == 'paired' |
| 77 cp ./fastq_out/${acc}_1.fastq.gz '$output_r1' && | 74 cp ./fastq_out/${acc}_1.fastq.gz '$output_r1' && |
| 145 <!-- ── FASTQ DUMP ── --> | 142 <!-- ── FASTQ DUMP ── --> |
| 146 <when value="fastq_dump"> | 143 <when value="fastq_dump"> |
| 147 <param name="accession" type="text" label="SRA Accession" | 144 <param name="accession" type="text" label="SRA Accession" |
| 148 help="SRA run accession to fetch and convert, e.g. SRR000001. Must be present in sra-pub-run-odp."> | 145 help="SRA run accession to fetch and convert, e.g. SRR000001. Must be present in sra-pub-run-odp."> |
| 149 <validator type="empty_field" message="An SRA accession is required."/> | 146 <validator type="empty_field" message="An SRA accession is required."/> |
| 150 <validator type="regex" message="Must be a valid SRA run accession (SRR, ERR, or DRR followed by digits).">^\[SED\]RR\[0-9\]+$</validator> | 147 <validator type="regex" message="Must be a valid SRA run accession (SRR, ERR, or DRR followed by digits).">^[SED]RR[0-9]+$</validator> |
| 151 </param> | 148 </param> |
| 152 <param name="layout" type="select" label="Read layout" | 149 <param name="layout" type="select" label="Read layout" |
| 153 help="Paired-end produces two datasets labelled accession_1 and accession_2. Single-end produces one dataset. Check the SRA record to confirm layout before running."> | 150 help="Paired-end produces two datasets labelled accession_1 and accession_2. Single-end produces one dataset. Check the SRA record to confirm layout before running."> |
| 154 <option value="paired" selected="true">Paired-end (R1 + R2)</option> | 151 <option value="paired" selected="true">Paired-end (R1 + R2)</option> |
| 155 <option value="single">Single-end</option> | 152 <option value="single">Single-end</option> |
