Advertisement
ProzacR

composition_matrix_spike script

Jan 7th, 2020
490
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.17 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. /data/data_fastq/reads_colapsed # export BOWTIE2_INDEXES=/data/data_fastq/reads_colapsed/spike/
  4. /data/data_fastq/reads_colapsed # 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 | awk '{ seen[$1] += $2 } END { for (i in seen) print i, seen[i] }' | sort -k 1 > ${file}.out; done
  6. 983aaaec4dff /data/data_fastq/reads_colapsed # #for file in *.sam; do grep -v "@" $file | awk -F "\t|x" '{print $4, " ", $2}' | sort -k 1 > ${file}.out; done
  7. # tmp yra visur po 0 dar, kad susivienodintu eiluciu sk
  8. for file in *.out; do cat tmp >> $file; done
  9. 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
  10. pirmas stulpelis tai tmp su nauje eilute
  11. for file in ../????; do echo ${file:3:8} > ${file:3:8}; done
  12. for file in *.out.out; do awk '{print $2}' $file >> ${file:0:4};done
  13. paste -d "," tmp ???? > composition_matrix_spike.csv
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement