Skip to content

UofABioinformaticsHub/20190923_Malik_vertebrate_12S

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

Setup Entrez Direct (EDirect)

cd ~
CWD=$(pwd)
perl -MNet::FTP -e \
  '$ftp = new Net::FTP("ftp.ncbi.nlm.nih.gov", Passive => 1);
   $ftp->login; $ftp->binary;
   $ftp->get("/entrez/entrezdirect/edirect.tar.gz");'
gunzip -c edirect.tar.gz | tar xf -
rm edirect.tar.gz
export PATH=${PATH}:$CWD/edirect >& /dev/null || setenv PATH "${PATH}:$CWD/edirect"
./edirect/setup.sh

# Setup path permamantly
echo "export PATH=\${PATH}:$CWD/edirect" >> $HOME/.bashrc

Search for all Vertebrate 12S Sequences

PROJECT_WORKING_DIRECTORY='Documents/research/support/Arif_Malik/'

mkdir -p "${PROJECT_WORKING_DIRECTORY}"
cd "${PROJECT_WORKING_DIRECTORY}"

# Taxonomy
time esearch -db nuccore -query 'vertebrates[porgn] AND 12S ribosomal rna[Title] OR 12S rrna[Title] NOT partial [Title]' \
  | efilter -location mitochondrion \
  | efetch -format xml \
  | xtract -pattern Seq-entry -element Textseq-id_accession -element Textseq-id_version -element OrgName_lineage \
  | sed 's/\t/./' \
  | awk '$1~/\./' \
  > 12S_vertebrates.taxonomy

# Sequences
time esearch -db nuccore -query 'vertebrates[porgn] AND 12S ribosomal rna[Title] OR 12S rrna[Title] NOT partial [Title]' \
  | efilter -location mitochondrion \
  | efetch -format fasta \
  | bgzip \
  > 12S_vertebrates_all.fasta.gz

Extract Sequence Subset Based on Taxonomy

Ensure we get the subset of sequences for which we have taxonomic information:

cut -f1 12S_vertebrates.taxonomy \
  | xargs samtools faidx 12S_vertebrates_all.fasta.gz \
  | bgzip \
  > 12S_vertebrates.fasta.gz

Resources

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published