genomewalker
5/3/2016 - 1:27 PM

bgg_from_asm.sh

# Some variables
declare -r NAM='TARA_023_SRF_0.22-1.6'
declare -r NSLOTS=8
declare -r UPROC=~/opt/uproc-1.2.0/bin/uproc-prot
declare -r FBN=~/opt/bbmap/filterbyname.sh
declare -r ASM='TARA_023_SRF_0.22-1.6_assembly.fasta'

# UPROC related DBs
declare -r BGCDB=~/biodb/bgc13062014
declare -r UPROCM=~/biodb/model

# ORFs already predicted with Prodigal
ORFS=~/BGC/input/${NAM}_scaffold.aa.fasta

# Run UPROC
${UPROC} -z ${NAM}.bgc.gz -p -t ${NSLOTS} ${BGCDB} ${UPROCM} ${ORFS} 

# Get contigs ids from UPROC output
zcat ${NAM}.bgc.gz | cut -f 2 -d ',' | cut -f2 -d ',' | cut -f -5 -d '_' | sort -u | > ${RES}/${NAM}.bgc.contigs.id.txt

# Use filterbyname.sh from BBMAP package to extract the contigs
${FBN} in=${ASM} names=${NAM}.bgc.contigs.id.txt out=${NAM}.bgc.contigs.fasta.gz include=t