Skip to content

Oodnadatta/bioinfo-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bioinfo script

Smake

Motivation

Generate VCF from fastq

Usage

$ smake.py [OPTIONS] COMMAND [ARGS]

Commands

Smake scans a directory containing fastqs. Smake creates:

  • a Makefile which can be used to create one (multisample) VCF from fastqs, depending on information given by the user (sample names)
  • a SMakefile which save this information to avoid having to give it again for subsequent uses.

scan

The scan command is required before using regenerate and list commands. In order to add new fastqs to the analysis, scan command is required.

OptionsDescription
--fullPerforms a full scan, ignoring existing Makefile. Exclusive with --update and --ask
--updatePerform a partial scan, updating existing Makefile. Exclusive with --full and --ask
--askAsk whether to perform a full scan or an update. Exclusive with --full and --ask (default)
-o, --outputPath to the Makefile to generate (default: in the scanned directory)
--helpShow this help and exit

Example:

$ smake.py scan --full FastqDirectory/ -o Makefile

regenerate

The regenerate command renegerates the Makefile using information kept in the SMakefile. This command is used if:

  • the Makefile has been manually edited
  • the Makefile has been damaged
  • Smake has been updated
OptionsDescription
--fullPerforms a full scan, ignoring existing Makefile
--updatePerform a partial scan, updating existing Makefile
--askAsk whether to perform a full scan or an update (default)
--helpShow this help and exit

Example:

$ smake.py regenerate Makefile

list

The list command shows all the targets in the Makefile. These targets can be passed as parameter to gmake.

OptionsDescription
--helpShow this help and exit

Example:

$ smake.py list Makefile

Dependencies

  • smake.py: main program
  • smake: symbolic link to py3wrapper
  • _smake: autocomplete for zsh
  • Makefile.tpl: template for Makefile to generate by smake.py
  • SMakefile.tpl: template for SMakefile to generate a Makefile with annotations concerning samples
  • py3wrapper: in order to use python3 on a python2 machine

vcfsetop

Motivation

Performs set manipulations on variants (inclusions and / or exclusions of variants from a VCF in another VCF).

Usage

$ vcfsetop.py [OPTIONS] COMMAND [ARGS]

Commands

filter

The filter command filter variants from a VCF file (stdin if the argument is "-"), to keep only variants from the required samples (if any), from the included samples (otherwise) and not from the excluded samples (anyway).

OptionsDescription
-e, --excludeDrop variants from this sample
-i, --includedKeep variants from this sample
-r, --requireKeep variants from this sample only
--xgi / --no-xgiExpand unknown genotypes for included samples (default: no)
--xge / --no-xge Expand unknown genotypes for excluded samples (default: no)
--helpShow this help and exit

Example:

$ vcfsetop filter -r Sample1 -r Sample2 -e Sample3 input.vcf > output.vcf

This command keeps common variants in Sample1 and Sample2, and excludes variants in Sample3. Samples should be in a same VCF file in input.

list

The list command list sample that can be used to filter variants from a VCF file using the filter command.

--helpShow this help and exit

Example:

$ vcfsetop list input.vcf

Dependencies

  • vcfsetop.py: main program
  • vcfsetop: symbolic link to py3wrapper
  • vcfsetop: autocomplete for zsh
  • py3wrapper: in order to use python3 on a python2 machine

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published