Giter VIP home page Giter VIP logo

reconcile's Introduction

RECONcile

Table of contents

About RECONcile

Take clustered element fragment coordinates from RECON and write sequences to FASTA for alignment and consensus calling.

Options and usage

Installing RECONcile

Install from this repository.

git clone https://github.com/Adamtaranto/RECONcile.git && cd RECONcile

Example Workflow

Get total count and names of candidate TEs for RECON

awk '/^>/ {print $1;} ' Unclustered_candidate_TEs.fa | wc -l | sed 's/^ *//g' > denovo_names.txt  
awk '/^>/ {print $1;} ' Unclustered_candidate_TEs.fa | sed 's/>//g' | sed 's/^ *//g' >> temp_names.txt  

Sort in lexical order

cat temp_names.txt | sort >> denovo_names.txt  
rm temp_names.txt  

Run All vs All BLAST

blastn -subject Unclustered_candidate_TEs.fa -query Unclustered_candidate_TEs.fa \  
-out denovo_all_v_all.tab -evalue 0.001 -outfmt 6 -task blastn -max_target_seqs 1000  

Keep all non-self hits with bitscore > 100

awk '{if ($1 != $2 && $12 >= 100) print;}' denovo_all_v_all.tab > filtered_hits.tab  

MSPCollect fails, use blast2MSP.pl to convert to blast result to MSP format instead:

./blast2MSP.pl filtered_hits.tab > MSP_denovo.out  

Run RECON

./RECON-1.08/scripts/recon.pl denovo_names.txt MSP_denovo.out 1  

Clean up eles output file from RECON

awk '!/^#/ {print;}' eles | sed 's/\( \)*/\1/g' | cut -d' ' -f 2- > Clean_Eles.txt  

Fetch fragments for each family

./RECON_cluster.py -i Unclustered_candidate_TEs.fa -e Clean_Eles.txt -d output_clusters  

Align clustered fragments with MAFFT

mkdir mafftaligns  
for i in $(find output_clusters -name '*.fa' | sort);do  
base=$(basename $i)  
name="${base%.*}"  
mafft $i > 'mafftaligns/'$name'.aln'  
done  

Build concensus sequences from alignments with cons

mkdir consensus_fasta  
for i in $(find mafftaligns -name '*.aln' | sort);do  
base=$(basename $i)  
name="${base%.*}"  
cons -sequence $i -identity 0 -snucleotide1 -supper1 -name $name'_consensus' \  
-outseq 'consensus_fasta2/'$name'_consensus.fa' -auto  
done  

Concatenate all consensus sequences and convert to uppercase

rm RECON_consensus.fa  
touch RECON_consensus.fa  
for x in $(find consensus_fasta -name '*.fa' | sort);do  
tr [:lower:] [:upper:] < $x >> RECON_consensus.fa  
done  

Standard options

Usage: RECONcile [-h] -i INFASTA [-e ELES] [-d OUTDIR]

Extracts and orients TE frags belonging to RECON clusters.

Optional arguments:
  -h, --help        Show this help message and exit
  -i, --inFasta     Multi fasta containing all TE sequences.
  -e, --eles        Space delimited 'ele' file from RECON.
  -d, --outDir      Directory for new cluster files to be written to.

License

Software provided under MIT license.

reconcile's People

Contributors

adamtaranto avatar

Watchers

 avatar  avatar  avatar

reconcile's Issues

Deal with singletons

Note need to automate skip of single member clusters as per RECON 'families' file

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.