Advertisement
ProzacR

spike notes

Jan 8th, 2020
491
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.96 KB | None | 0 0
  1. /data/data/bowtie2-2.3.5.1-linux-x86_64/bowtie2-build /data/data/spike.fa spike
  2. #sumest i viena folderi spike paskui ir
  3. export BOWTIE2_INDEXES=/data/data_fastq/reads_colapsed/spike/
  4. for file in *.fa; do /data/data/bowtie2-2.3.5.1-linux-x86_64/bowtie2 -f -N 0 --no-unal -x spike -U $file -S ${file%fa}sam; done
  5. for file in *.sam; do grep -v "@" $file | awk -F "\t|x" '{print $4, " ", $2}' | sort -k 1 > ${file}.out; done
  6. # tmp yra visur po 0 dar, kad susivienodintu eiluciu sk
  7. for file in *.out; do cat tmp >> $file; done
  8. for file in *.out; do cat $file | awk '{ seen[$1] += $2 } END { for (i in seen) print i, seen[i] }' | sort -k 1 > ${file}.out; done
  9. pirmas stulpelis tai tmp su nauje eilute
  10. for file in ../fastq/*/; do var=$(echo $file | cut -d '/' -f 3) && echo $var > $var; done
  11. for file in ../fastq/*/; do var=$(echo $file | cut -d '/' -f 3) && awk '{print $2}' ${var}_reads_colapsed.sam.out.out >> $var; done
  12. paste -d "," tmp ???? > composition_matrix_spike.csv
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement