Coder Social home page Coder Social logo

sarekprio's Introduction

sarekPrio

Shortcut on tsv-file making

The Sarek tsv-file should have 7 columns (tab-separated) and no headers

Col1 Col2 Col3 Col4 Col5 Col6 Col7
Patient 1 XX 1 Patient1-Tumor Patient1-Tumor-L001 p1-T_R1.fastq.gz p1-T_R2.fastq.gz
Patient 1 XX 0 Patient1-Normal Patient1-Normal-L001 p1-N_R1.fastq.gz p1-N_R2.fastq.gz

Col 1 is Patient ID, col 2 is gender, col 3 is 1 for Tumor and 0 for Normal. col4 is Sample name, col5 is sample name (+ lane if sequenced in multiple lanes), col6 is path to R1 fastq file, col7 is path to R2 fastq file.

Start by automatically generate col6 and col7 for all samples using the code snippet below, then edit the resulting file and type in col 1-5 manually.

Go to a parent folder of the fastq files, list all R1 fastq.gz files, then R2 files. pwd is the path to the current directory. Keep this to get full paths.

find `pwd` -name *R1*.fastq.gz | sort > r1files.txt
find `pwd` -name *R2*.fastq.gz | sort > r2files.txt
paste r1files.txt r2files.txt > all.tsv

Open the all.tsv file in a text editor and add the missing columns.

It is recommended to start Sarek separately for each patient. The code below takes all.tsv and divides into one tsv file per patient

cut -f1 all.tsv | sort| uniq| while read -r name; do grep $name all.tsv > $name.tsv; done

sarekprio's People

Stargazers

 avatar

Watchers

James Cloos avatar

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.