Off topic:loop for samtools to deal with multiple files
0
0
Entering edit mode
6.6 years ago
hfang4 ▴ 10

Hello,

I have a script to run samtools pileup for multiple files. The script worked if I ran one file at a time without loop, but it gave me error saying "Illegal variable name" with the loop. So, I think it is something wrong with the loop. I have to use the old version of samtools with the pileup for the downstream analysis. Please anyone help me out with the issue.

#! /bin/csh

cd /share/gwascotton/GBS_data/pileup_trial/ source /usr/local/apps/samtools/samtools017a.csh for i in $(ls *.bam);do samtools pileup -c -l /share/gwascotton/GBS_data/merged_files.sorted.bam.pileup -f /share/gwascotton/GBS_data/Ghirsutum_458_v1.0.fa /share/gwascotton/GBS_data/pileup_trial/"$i" > /share/gwascotton/GBS_data/new/"$i".pileup done ;

Thank you.

fhzh

SNP software error • 1.3k views
ADD COMMENT
This thread is not open. No new answers may be added
Traffic: 2051 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6