This is a test version of Biostars. For the public version, visit https://www.biostars.org.
why I download .sra file throught the SraRunInfo.csv but got files with extensions .2

I want to reproduce the experimental results of this article:https://www.nature.com/articles/nprot.2013.099#Abs1

but after download sra files with this code↓:

sri = read.csv("SraRunInfo.csv", stringsAsFactors=FALSE)
keep = grep("CG8144|Untreated-", sri$ LibraryName)
sri = sri[keep,]

fs = basename(sri$download_path)
for(i in 1:nrow(sri))
download.file(sri$download_path[i], fs[i])

I got some files with extensions .2 such as SRR031708.2

By the way, my SraRunInfo.csv was download by send to→file→runinfo in the NCBI page. Please tell me how to fix this problem. Thank you very much.

enter image description here

first picture is the SraRunInfo.csv in the article

second one is what in the SraRunInfo.csv I download enter image description here

ncbi sra

Which SRA accession numbers are you working with?

1 answer

That is how the R basename function works:

basename("a/b.2")
[1] "b.2"

from the help

basename removes all of the path up to and including the last path separator (if any).

Thank you very much, but my download path in SraRunInfo.csv which download from NCBI is different from the article, I think it is the problem

SRA data has since moved to cloud so the links above are likely referring to the cloud data location. Those appear to be .sra format files. You can then dump reads out using fastq-dump.

Log in to answer this question.