Step 1: I have a folder, /genomes, and in it I have 320 folders, each containing 4 files. I want to read in a file line by line and match each file from different folders to this line. There will be one file ending in *.tg.vcf which matches this line in different folders. I want to read in the first 25 lines of this file to see if it contains "-10A-" and "-01A-" and "gencode". If is does I want to move that whole folder to another folder.
Step 2: For those samples which were missing I want to check and see if they contain "10A" and "01B" and "gencode" instead and move those over to the other folder.
My start on step 1 -
awk '{print $1}' list_of_samples.txt | while read -r a; do head -25 */$a*tg.vcf; if grep -q '10A\|01A\|gencode'; then scp ../$a /username/folder/ | echo $a ; fi; done
Aucun commentaire:
Enregistrer un commentaire