Giter VIP home page Giter VIP logo

seq-scripts's Introduction

Overview

seq-frag – ref-based simulation of reads/contigs

Simulate fragment libraries (Illumina SE/PE/MP, Pacbio, contigs) from reference sequences. Errors models are not currently supported.

Dependencies
cpanm Math::Random

# wherever you prefer
git clone https://github.com/BioInf-Wuerzburg/perl5lib-Fasta.git
git clone https://github.com/BioInf-Wuerzburg/perl5lib-Fasta.git

export PERL5LIB=/path/to/perl5lib-Fasta/Fastq:$PERL5LIB
Usage
seq-frag MODE -l LENGTH -c COVERAGE [options ..] < FASTA
# 50X 100bp single end reads
seq-frag se -l 100 -c 50 < genome.fa > read.fq
# 50X 100bp paired end, 180bp insert
seq-frag pe -l 100 -c 50 -i 180 < genome.fa | interleaved-split 1>reads_1.fq 2>reads_2.fq
# 50X mate pair, 2000bp insert
seq-frag mp -l 100 -c 50 -i 2000 < genome.fa | interleaved-split 1>reads_1.fq 2>reads_2.fq
# 20X pacbio style fragments, mean length 2000bp
seq-frag pacbio -l 2000 -c 20 < genome.fa > pb-reads.fq

# for more details
seq-frag --help
Sample
seq-frag mp -l 100 -c 1 -i 2000 ref.fa | interleaved-split 1> r_1.fq 2> r_2.fq
seq-frag mp -l 100 -c 1 -i 2000 -s ref.fa | interleaved-split 1> s_1.fq 2> s_2.fq

Mapped with bwa mem and visualized with IGV:

etc/seq-frag-mp.png

bio2svg – plot bam/gff/bed tracks to svg

Plot mappings (bam), features and annotations (gff, bed) along sequences to high quality SVGs.

Dependencies
Usage
git clone https://github.com/thackl/perl5lib-Gff.git
git clone https://github.com/thackl/perl5lib-SVG-Bio.git

export PERL5LIB=/path/to/perl5lib-Gff/lib:/path/to/perl5lib-SVG-Bio/lib:$PERL5LIB;

bio2svg --fasta FA --region REGION --gff GFF --bam BAM > SVG

Region can be either a sequence ID (Chr4) or an ID with range (Chr4:521-15521).

Sample
bio2svg --width 10000 --fa MaV-is-CrEc-001.ctg.fa --region MaV-is-CrEc-001 \
 --gff mav-regions.gff --gff MaV-gen-2.0.maker.lifted.gff \
 --gff CrEc-gen-dp-1.0.all.lifted.gff \
 --bam PCR\~MaV-is-CrEc-001.ctg.bam \
 --bam pr-all\~MaV-is-CrEc-001.ctg-support.bam \
 --bam pr-all~MaV-is-CrEc-001.ctg-bridge.bam \
 > MaV-is-CrEc-001.ctg.svg

etc/bio2svg-sample.png etc/bio2svg-sample.svg

seq-scripts's People

Contributors

thackl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

seq-scripts's Issues

Update export details

Hi,

In your example, the path to the export function is slightly off.

Could you please update it to the following:

export PERL5LIB=/path/to/perl5lib-Fasta/lib:$PERL5LIB

Thank you,
Susheel

Issue with seq-gc

Hello,

I am trying to run your gggenomes tutorial and I am having some trouble for the GC content as shown in the tutorial (here).
I am using your emales.fna data and have run the protocol (with some hiccups but) successfully until this point.

I believe the issue I am having is related to samtools/bedtools, which are needed for this part of the analysis.

After installing both, I try to run:
seq-gc -Nbw 50 emales.fna > emales-gc.tsv

Actually like this, because I am running on macOS Monterey 12.2.1 Terminal:
perl seq-gc.pl -Nbw 50 emales.fna > emales-gc.tsv

And I get the error messages:

[E::fai_build3_core] Failed to open the file seq-gc
[faidx] Could not build fai index seq-gc.fai
cut: seq-gc.fai: No such file or directory
Error: The requested fasta database file (seq-gc) could not be opened. Exiting!

I have tried running with and without the 'perl' and the '.pl', and this is the only way it recognises there is even a seq-gc to run.

Full disclosure: although I am very comfortable in R, I am not used to using any of the other languages that are present in the tutorial. Nevertheless, I have been able to run everything up until this point, which is what made me think it may be an issue with the code itself.

Thank you for your time in advance, and thank you for gggenomes!
Cátia

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.