ncbi / sra-tools

SRA Tools
Other
1.11k stars 243 forks source link

prefetch issue #870

Closed bugandong closed 10 months ago

bugandong commented 11 months ago

I have written a script like this:

READS="SRR16938767"  
WGBS_DIR="/home/lyx/miniconda3/envs/py310_r/WGBS"
SUB_DIR="$WGBS_DIR/$READS"
READS_DIR="$SUB_DIR/reads"
REF_DIR="$SUB_DIR/ref"
OUT_DIR="$SUB_DIR/output"
mkdir -p "$WGBS_DIR"
mkdir -p "$SUB_DIR"
mkdir -p "$READS_DIR"
mkdir -p "$REF_DIR"
mkdir -p "$OUT_DIR"

# 下载测序数据
prefetch -o "$READS_DIR" "$READS"

but it had an error : 2023-10-30T01:40:00 prefetch.3.0.7: Current preference is set to retrieve SRA Normalized Format files with full base quality scores. 2023-10-30T01:40:02 prefetch.3.0.7: /home/lyx/miniconda3/envs/py310_r/WGBS/SRR16938767-wgbs/reads (not a file) is found locally: consider it complete 2023-10-30T01:40:02 prefetch.3.0.7: 1) 'SRR16938767' is found locally 测序数据不存在于预期的目录下

then i found a file named SRR16938767 in the WGBS file, it's this the problem?

and when I use this code: prefetch SRR16938767 it can download the sra file successfully

what's wrong with this script?😭

klymenko commented 11 months ago

-o or --output-file option of prefetch is Write file to FILE when downloading single file.

You specify:

READS_DIR="$SUB_DIR/reads"
prefetch -o "$READS_DIR"

$READS_DIR exists. prefetch states that by printing /home/lyx/miniconda3/envs/py310_r/WGBS/SRR16938767-wgbs/reads (not a file) is found locally By default prefetch don't starts redownload when requested accession is found locally.

bugandong commented 11 months ago

-o or --output-file option of prefetch is Write file to FILE when downloading single file.

You specify:

READS_DIR="$SUB_DIR/reads"
prefetch -o "$READS_DIR"

$READS_DIR exists. prefetch states that by printing /home/lyx/miniconda3/envs/py310_r/WGBS/SRR16938767-wgbs/reads (not a file) is found locally By default prefetch don't starts redownload when requested accession is found locally.

Thank you!