-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Having issues with combine_vcf.py #5
Comments
Hi Ilaria, Based on the error massage, it seems that the program parsed a strange entry that has only 3 fields as a Tandem Repeat entry line (which should have 10 fields) in the vcf. The script was written to parse the "sample" (i.e., the sample name of each input vcf) variable directly from input vcfs. The sample name taken from each individual vcf is the last field of the last header line of each vcf. Was there an issue if you run the script without modifying it? Thanks, |
Hi Bida,
Thanks for your quick response! When running the unedited version I get this:
python3 combine_vcf_original.py -i vamos_calls.csv -o merged_output.vcf
2023-12-11 16:44:21 - INFO - Parsing Input Arguements...
2023-12-11 16:44:21 - INFO - Required Argument - inVCFs: vamos_calls.csv
2023-12-11 16:44:21 - INFO - Required Argument - outVCF: merged_output.vcf
2023-12-11 16:44:21 - INFO - Parsing Input Arguements Completed
Traceback (most recent call last):
File "/mnt/scratch/ilaria/VNTR/vamos_sherlock/ADRC_vamos/combine_vcf_original.py", line 193, in <module>
samplesAll, header, vcfDict = readAllVCF(inVCFs)
^^^^^^^^^^^^^^^^^^
File "/mnt/scratch/ilaria/VNTR/vamos_sherlock/ADRC_vamos/combine_vcf_original.py", line 138, in readAllVCF
samplesAll.append(getVCFSampleName(vcfs[0]))
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/scratch/ilaria/VNTR/vamos_sherlock/ADRC_vamos/combine_vcf_original.py", line 52, in getVCFSampleName
return sample
^^^^^^
UnboundLocalError: cannot access local variable 'sample' where it is not associated with a value
Thanks,
Ilaria
From: Bida Gu ***@***.***>
Date: Monday, December 11, 2023 at 3:53 PM
To: ChaissonLab/vamos ***@***.***>
Cc: Ilaria Stewart ***@***.***>, Author ***@***.***>
Subject: Re: [ChaissonLab/vamos] Having issues with combine_vcf.py (Issue #5)
Hi Ilaria,
Based on the error massage, it seems that the program parsed a strange entry that has only 3 fields as a Tandem Repeat entry line (which should have 10 fields) in the vcf.
The script was written to parse the "sample" (i.e., the sample name of each input vcf) variable directly from input vcfs. The sample name taken from each individual vcf is the last field of the last header line of each vcf. Was there an issue if you run the script without modifying it?
Thanks,
Bida
—
Reply to this email directly, view it on GitHub<#5 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BDLIGF7S5YS2RVQ3VOWKY4DYI6MF5AVCNFSM6AAAAABAQHTMH2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJRGA4DAOBRGE>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Hi Ilaria, Could you please also share the command you used to run vamos? Thanks! |
Hi Bida,
Certainly! Here is what I ran to iterate through our cohort:
set -x
# Print the activation command
echo "Activating Vamos environment:"
source activate vamos
# Run Vamos command
# Specify the Vamos parameters
VAMOS_COMMAND="vamos --read -b"
VAMOS_REGION="-r /home/users/ilaria99/vntr_region_motifs.e.bed"
OUTPUT_DIR="/scratch/users/ilaria99"
THREADS=4
# Directory containing subject directories
SUBJECT_DIR="/oak/output"
# Iterate through each subject directory
for dir in "$SUBJECT_DIR"/*; do
if [ -d "$dir" ]; then
dir_name=$(basename "$dir")
input_bam="$SUBJECT_DIR/$dir_name/$dir_name.GRCh38.sorted.bam"
output_vcf="$OUTPUT_DIR/${dir_name}_vamos_reads.vcf"
# Check if the output VCF file already exists
if [ -e "$output_vcf" ]; then
echo "Skipping $input_bam - VCF file already exists: $output_vcf"
else
# Run Vamos on the BAM file
echo "Running Vamos on $input_bam"
$VAMOS_COMMAND "$input_bam" $VAMOS_REGION -s "$dir_name" -o "$output_vcf" -t "$THREADS"
fi
fi
done
Best,
Ilaria
From: Bida Gu ***@***.***>
Date: Monday, December 11, 2023 at 5:37 PM
To: ChaissonLab/vamos ***@***.***>
Cc: Ilaria Stewart ***@***.***>, Author ***@***.***>
Subject: Re: [ChaissonLab/vamos] Having issues with combine_vcf.py (Issue #5)
Hi Ilaria,
Could you please also share the command you used to run vamos? Thanks!
—
Reply to this email directly, view it on GitHub<#5 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BDLIGF7CGZCESAYWBYBQTL3YI6YOLAVCNFSM6AAAAABAQHTMH2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJRGE3DKNZRG4>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Hi there,
I ran the newest vamos on my cohort and trying to merge the vcf files. I am running into issues with the combine_vcf.py script. I had to make a change to the script to initialize the sample variable and now am getting issues with the readOneVCF function:
Thank you for any insights you can provide!
The text was updated successfully, but these errors were encountered: