![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to Make Wiggle file from RNA-seq bam | masylichu | Bioinformatics | 2 | 11-16-2012 05:38 AM |
Does anyone make your own gtf file? | awenxu | RNA Sequencing | 0 | 05-30-2012 01:36 AM |
Running stampy in bash script | grafab | Bioinformatics | 7 | 04-23-2012 03:00 AM |
Custom directory install | coco2001 | 454 Pyrosequencing | 2 | 11-29-2011 06:59 PM |
Disable iterative search in BWA aln | yanasmann | Bioinformatics | 1 | 08-31-2010 11:38 AM |
![]() |
|
Thread Tools |
![]() |
#1 |
Junior Member
Location: Texas Join Date: May 2013
Posts: 7
|
![]()
Well you've all been wonderful about answering my novice questions...so here is another. I thank you in advance for generously providing an answer.
What I'm trying to do is loop through a directory, using simple bash script, to a set of files and then process the files to a *.sam format using bwa...here's the code I have so far... #!bin/bash #basic syntax below #bwa samse ref.fa aln_sa.sai short_read.fq > aln-se.sam module load bwa FILE1="$WORK/trimmed/*se.fq" FILE2="$WORK/trimmed/*.sai" for f in FILE1 and FILE2 do bwa samse whole_genome.fa "$f2".sai "$f1".fq > "$f".sam done |
![]() |
![]() |
![]() |
#2 |
Senior Member
Location: uk Join Date: Mar 2009
Posts: 667
|
![]()
if your *.sai and *se.fq files have the same prefix (presumably you have one file of each type for each bwa alignment you want to run), you could try:
Code:
FILE2="$WORK/trimmed/*.sai" WORKDIR="$WORK/trimmed/" for f in $FILE2 do prefix=`basename $f .sai` bwa samse whole_genome.fa ${WORKDIR}${prefix}.sai ${WORKDIR}${prefix}se.fq > ${WORKDIR}${prefix}.sam done Last edited by mastal; 05-22-2013 at 03:41 PM. Reason: corrected error in code |
![]() |
![]() |
![]() |
#3 |
Junior Member
Location: Texas Join Date: May 2013
Posts: 7
|
![]()
Hi Mastal:
Thank you for the reply, and I will certainly try this out...they do have similar prefixes... -Jennifer |
![]() |
![]() |
![]() |
Tags |
!bin/bash script, bwa, interative looping |
Thread Tools | |
|
|