From Genome Analysis Wiki
Jump to navigationJump to search
878 bytes added
, 16:07, 18 March 2010
Line 10: |
Line 10: |
| Output FastQ Files | | Output FastQ Files |
| Output : --first [], --second [], --single [] | | Output : --first [], --second [], --single [] |
| + | |
| + | Required parameter |
| + | -i InputBAM/SAM |
| + | |
| + | Optional parameters for output (however either --single or both --first and --second have to be provided) |
| + | --first firstReadInAPair_FastQ |
| + | --second secondReadInAPair_FastQ |
| + | --single unpairedReads_FastQ |
| + | |
| + | In order to extract paired end reads, the BAM file has to be sorted by name, e.g. using samtools. Suppose the BAM file is myinput.bam |
| + | |
| + | samtools sort -n myinput.bam myinout.sortByName.bam |
| + | |
| + | Using sorted bam file to extract paired end fastq files |
| + | |
| + | bam2FastQ -i myinput.sortByName.BAM --first myread1.fastQ --second myread2.fastQ |
| + | |
| + | Or to extract both paired end and single end fastq files |
| + | |
| + | bam2FastQ -i myinput.sortByName.BAM --first myread1.fastQ --second myread2.fastQ --single myreadSingle.fastQ |
| + | |
| + | Or using bam (sorted or not) file to extract single end fastq files |
| + | |
| + | bam2FastQ -i myinput.sortByName.BAM --single myreadSingle.fastQ |