<commit_before># SRA2R
SRA2R, a package to import SRA data directly into R

## The AWS Instance Details

http://ec2-52-90-90-120.compute-1.amazonaws.com/

```
chmod 400 ncbi_sra2r.pem
ssh -i 'ncbi_sra2r.pem' ubuntu@ec2-52-90-90-120.compute-1.amazonaws.com
su - userXXX
```

```
download.file('http://ftp-trace.ncbi.nlm.nih.gov/sra/sdk/2.5.7/sratoolkit.2.5.7-ubuntu64.tar.gz',destfile='~/sratoolkit.2.5.7-ubuntu64.tar.gz')
untar('~/sratoolkit.2.5.7-ubuntu64.tar.gz',compressed=TRUE)
```

### git setup for github

Before using git with github, you'll want to do this on the AWS instance.

```
ssh-keygen
cat ~/.ssh/id_rsa.pub
```

copy the contents of that string to the github settings/ssh keys location

```
git config --global user.name '<NAME>'
git config --global user.name '<EMAIL>'
```


## SRA ToolKit examples

### sra-stat example 

http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=toolkit_doc&f=sra-stat

```
(known good but large)
sra-stat --quick --xml SRR390728
(smaller file)
sra-stat --quick --xml SRR2971307
(small and no alignment)
sra-stat --quick --xml ERR1162649
```

### sra-pileup

http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=toolkit_doc&f=sra-pileup

Command-line

```
sra-pileup -r chr20:1530960-1540960 SRR2971307
```

In R

```
x = read.delim(text = system('~/sratoolkit.2.5.7-ubuntu64/bin/sra-pileup -r chr20:1530960-1540960 SRR2971307',intern=TRUE))
```


## ncbi ngs SDK details

- /usr/include/ngs (interfaces for C++ ngs)
- /usr/include/ncbi-vdb (NGS.hpp)
- /usr/local/share/doc/ngs (javadoc)
- LD_LIBRARY_PATH = /usr/local/ngs/ngs-sdk/lib64:/usr/local/ncbi/ncbi-vdb/lib64:




<commit_msg>Added R and Rcpp documentation links<commit_after># SRA2R
SRA2R, a package to import SRA data directly into R

## The AWS Instance Details

http://ec2-52-90-90-120.compute-1.amazonaws.com/

```
chmod 400 ncbi_sra2r.pem
ssh -i 'ncbi_sra2r.pem' ubuntu@ec2-52-90-90-120.compute-1.amazonaws.com
su - userXXX
```

```
download.file('http://ftp-trace.ncbi.nlm.nih.gov/sra/sdk/2.5.7/sratoolkit.2.5.7-ubuntu64.tar.gz',destfile='~/sratoolkit.2.5.7-ubuntu64.tar.gz')
untar('~/sratoolkit.2.5.7-ubuntu64.tar.gz',compressed=TRUE)
```

### git setup for github

Before using git with github, you'll want to do this on the AWS instance.

```
ssh-keygen
cat ~/.ssh/id_rsa.pub
```

copy the contents of that string to the github settings/ssh keys location

```
git config --global user.name 'My Name'
git config --global user.name '<EMAIL>'
```


## SRA ToolKit examples

### sra-stat example 

http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=toolkit_doc&f=sra-stat

```
(known good but large)
sra-stat --quick --xml SRR390728
(smaller file)
sra-stat --quick --xml SRR2971307
(small and no alignment)
sra-stat --quick --xml ERR1162649
```

### sra-pileup

http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=toolkit_doc&f=sra-pileup

Command-line

```
sra-pileup -r chr20:1530960-1540960 SRR2971307
```

In R

```
x = read.delim(text = system('~/sratoolkit.2.5.7-ubuntu64/bin/sra-pileup -r chr20:1530960-1540960 SRR2971307',intern=TRUE))
```


## ncbi ngs SDK details

- /usr/include/ngs (interfaces for C++ ngs)
- /usr/include/ncbi-vdb (NGS.hpp)
- /usr/local/share/doc/ngs (javadoc)
- LD_LIBRARY_PATH = /usr/local/ngs/ngs-sdk/lib64:/usr/local/ncbi/ncbi-vdb/lib64:


## R and Rcpp documentation of interest

- http://dirk.eddelbuettel.com/code/rcpp/Rcpp-quickref.pdf
- http://adv-r.had.co.nz/Rcpp.html
- http://r-pkgs.had.co.nz/
- http://statr.me/rcpp-note/index.html
- https://cran.r-project.org/web/packages/Rcpp/vignettes/



{'fraction_non_alphanumeric': 0.17620524386805753, 'fraction_numerical': 0.06879052720608965, 'mean_word_length': 3.749665327978581, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 1, 'lorem ipsum': 0, 'www.': 4, 'xml': 6}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7403024', 'n_tokens_mistral': 1741, 'n_tokens_neox': 1488, 'n_words': 275}