Skip to content
Snippets Groups Projects
Commit c8457c6a authored by DURAND Karine's avatar DURAND Karine
Browse files

Upload New File

parent 103d3515
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
#SBATCH -p dgimi-eha
#SBATCH --mem=50G
module load cv-standard
module load python/2.7.12
cd /lustre/durandk/HELICOVERPA/TREEMIX/Results/file_vcf2treemix_assulta
# a faire ensuite
declare -A chrom_map=(
[NC_061482.1]="chr.31"
[NC_061481.1]="chr.30"
[NC_061480.1]="chr.29"
[NC_061479.1]="chr.28"
[NC_061478.1]="chr.27"
[NC_061477.1]="chr.26"
[NC_061476.1]="chr.25"
[NC_061475.1]="chr.24"
[NC_061474.1]="chr.23"
[NC_061473.1]="chr.22"
[NC_061472.1]="chr.21"
[NC_061471.1]="chr.20"
[NC_061470.1]="chr.19"
[NC_061469.1]="chr.18"
[NC_061468.1]="chr.17"
[NC_061467.1]="chr.16"
[NC_061466.1]="chr.15"
[NC_061465.1]="chr.14"
[NC_061464.1]="chr.13"
[NC_061463.1]="chr.12"
[NC_061462.1]="chr.11" # Updated here
[NC_061461.1]="chr.10"
[NC_061460.1]="chr.9"
[NC_061459.1]="chr.8"
[NC_061458.1]="chr.7"
[NC_061457.1]="chr.6"
[NC_061456.1]="chr.5"
[NC_061455.1]="chr.4"
[NC_061454.1]="chr.3"
[NC_061453.1]="chr.2"
[NC_061452.1]="chr.1"
)
cp DATA_Helicoverpa_16122024_138samples_OUTGROUP.filtered.recode.vcf.gz /lustre/durandk/HELICOVERPA/TREEMIX/Results/file_vcf2treemix_assulta
zcat DATA_Helicoverpa_16122024_138samples_OUTGROUP.filtered.recode.vcf.gz >> DATA_Helicoverpa_16122024_138samples_OUTGROUP.filtered.recode.vcf
# Perform the replacements on the decompressed file
for old_name in "${!chrom_map[@]}"; do
new_name="chr.${chrom_map[$old_name]}"
echo "Replacing $old_name with $new_name..."
sed -i "s/${old_name}/${new_name}/g" DATA_Helicoverpa_16122024_138samples_OUTGROUP.filtered.recode.vcf
done
#rename output vcf
mv DATA_Helicoverpa_16122024_138samples_OUTGROUP.filtered.recode.vcf DATA_Helicoverpa_16122024_138samples_OUTGROUP.filtered.rename.vcf
/storage/simple/projects/faw_adaptation/programs/vcftools_0.1.13/bin/vcftools \
--vcf DATA_Helicoverpa_16122024_138samples_OUTGROUP.filtered.rename.vcf \
--max-missing 1 \
--recode \
--out DATA_Helicoverpa_16122024_138samples_OUTGROUP.filtered.1.rename
/lustre/durandk/HELICOVERPA/TREEMIX/SCRIPT/vcf2treemix.sh DATA_Helicoverpa_16122024_138samples_OUTGROUP.filtered.1.rename.recode.vcf /lustre/durandk/HELICOVERPA/TREEMIX/SCRIPT/pop_assulta.clust
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment